pub struct GoogleConfig {
pub issuer_id: String,
pub service_account_email: String,
pub service_account_private_key_pem: String,
}Expand description
Google Wallet service-account credentials.
All three required fields must be present in the environment for the cluster
to populate — any missing required var ⇒ WalletConfig.google = None.
Fields§
§issuer_id: StringGOOGLE_WALLET_ISSUER_ID — Google Wallet issuer ID (numeric string).
service_account_email: StringGOOGLE_WALLET_SERVICE_ACCOUNT_EMAIL — service-account email.
service_account_private_key_pem: StringGOOGLE_WALLET_SERVICE_ACCOUNT_KEY_PEM — RSA private key (PEM, PKCS#8 or PKCS#1).
Implementations§
Source§impl GoogleConfig
impl GoogleConfig
Sourcepub fn from_env_optional() -> Result<Option<Self>, WalletError>
pub fn from_env_optional() -> Result<Option<Self>, WalletError>
Returns Ok(Some(cfg)) only when all three required Google env vars are set
AND non-empty; Ok(None) if ANY of them is missing or set to “”. Never returns Err.
Required vars: GOOGLE_WALLET_ISSUER_ID,
GOOGLE_WALLET_SERVICE_ACCOUNT_EMAIL, GOOGLE_WALLET_SERVICE_ACCOUNT_KEY_PEM.
Trait Implementations§
Source§impl Clone for GoogleConfig
impl Clone for GoogleConfig
Source§fn clone(&self) -> GoogleConfig
fn clone(&self) -> GoogleConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GoogleConfig
impl RefUnwindSafe for GoogleConfig
impl Send for GoogleConfig
impl Sync for GoogleConfig
impl Unpin for GoogleConfig
impl UnsafeUnpin for GoogleConfig
impl UnwindSafe for GoogleConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more