pub trait VaultClient: Send + Sync {
// Required methods
fn authenticate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, VaultError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_secret_with_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, SecretMetadata), VaultError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_secrets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VaultError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn client_info(&self) -> VaultClientInfo;
}
Expand description
Vault client trait for different secret management systems
Required Methods§
Sourcefn authenticate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn authenticate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Authenticate with the vault service
Sourcefn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a secret by name
Sourcefn get_secret_with_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, SecretMetadata), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_secret_with_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(String, SecretMetadata), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve a secret with metadata
Sourcefn list_secrets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_secrets<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List available secrets
Sourcefn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store a secret (if supported)
Sourcefn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), VaultError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a secret (if supported)
Sourcefn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_authenticated<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the client is authenticated
Sourcefn client_info(&self) -> VaultClientInfo
fn client_info(&self) -> VaultClientInfo
Get vault client information