pub trait SecretsController: Debug + Send + Sync {
    // Required methods
    fn ensure<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: GlobalId,
        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: GlobalId
    ) -> 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<GlobalId>, 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§

source

fn ensure<'life0, 'life1, 'async_trait>( &'life0 self, id: GlobalId, 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.

source

fn delete<'life0, 'async_trait>( &'life0 self, id: GlobalId ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Deletes the specified secret.

source

fn list<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<GlobalId>, 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.

source

fn reader(&self) -> Arc<dyn SecretsReader>

Returns a reader for the secrets managed by this controller.

Implementors§