pub enum AppSecretManager {
Aws(AwsSecretManager),
Memory(MemorySecretManager),
Json(JsonSecretManager),
}Expand description
App blanket secret manager backed by some underlying secret manager implementation
Variants§
Implementations§
Source§impl AppSecretManager
impl AppSecretManager
Sourcepub fn from_config(aws_config: &SdkConfig, config: SecretsManagerConfig) -> Self
pub fn from_config(aws_config: &SdkConfig, config: SecretsManagerConfig) -> Self
Create the secret manager from the provided config
The aws_config is required to provide aws specific settings when the AWS secret
manager is used
Sourcepub async fn set_secret(&self, name: &str, value: &str) -> Result<()>
pub async fn set_secret(&self, name: &str, value: &str) -> Result<()>
Set the value of name secret to value
Will create a new secret if the secret does not already exist
Sourcepub async fn delete_secret(&self, name: &str) -> Result<()>
pub async fn delete_secret(&self, name: &str) -> Result<()>
Delete a secret by name
Sourcepub async fn parsed_secret<D: DeserializeOwned>(
&self,
name: &str,
) -> Result<Option<D>>
pub async fn parsed_secret<D: DeserializeOwned>( &self, name: &str, ) -> Result<Option<D>>
Get a secret by name parsed as type [D] from JSON
Auto Trait Implementations§
impl !Freeze for AppSecretManager
impl !RefUnwindSafe for AppSecretManager
impl Send for AppSecretManager
impl Sync for AppSecretManager
impl Unpin for AppSecretManager
impl !UnwindSafe for AppSecretManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.