Trait mz_secrets::SecretsController
source · pub trait SecretsController:
Debug
+ Send
+ Sync {
// Required methods
fn ensure<'life0, 'life1, 'async_trait>(
&'life0 self,
id: CatalogItemId,
contents: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
id: CatalogItemId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CatalogItemId>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reader(&self) -> Arc<dyn SecretsReader>;
}
Expand description
Securely manages user secrets.
Required Methods§
sourcefn ensure<'life0, 'life1, 'async_trait>(
&'life0 self,
id: CatalogItemId,
contents: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ensure<'life0, 'life1, 'async_trait>(
&'life0 self,
id: CatalogItemId,
contents: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates or updates the specified secret with the specified binary contents.
sourcefn delete<'life0, 'async_trait>(
&'life0 self,
id: CatalogItemId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: CatalogItemId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes the specified secret.
sourcefn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CatalogItemId>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CatalogItemId>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists known secrets. Unrecognized secret objects do not produce an error and are ignored.
sourcefn reader(&self) -> Arc<dyn SecretsReader>
fn reader(&self) -> Arc<dyn SecretsReader>
Returns a reader for the secrets managed by this controller.