pub trait SecretStore: Send + Sync {
// Required methods
fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 SecretKey,
) -> Pin<Box<dyn Future<Output = SecretResult<SecretValue>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn secret_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 SecretKey,
) -> Pin<Box<dyn Future<Output = SecretResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_secrets<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = SecretResult<Vec<SecretKey>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_name(&self) -> &str;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SecretResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for pluggable secret storage backends.
Required Methods§
Sourcefn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 SecretKey,
) -> Pin<Box<dyn Future<Output = SecretResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 SecretKey,
) -> Pin<Box<dyn Future<Output = SecretResult<SecretValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a secret by key.
Sourcefn secret_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 SecretKey,
) -> Pin<Box<dyn Future<Output = SecretResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn secret_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 SecretKey,
) -> Pin<Box<dyn Future<Output = SecretResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a secret exists.
Sourcefn list_secrets<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = SecretResult<Vec<SecretKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_secrets<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = SecretResult<Vec<SecretKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List available secrets (if supported).
Sourcefn store_name(&self) -> &str
fn store_name(&self) -> &str
Get the store name for logging/debugging.
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SecretResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SecretResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the store is healthy/connected.