SecretsStore

Trait SecretsStore 

Source
pub trait SecretsStore: Send + Sync {
    // Required method
    fn read(&self, scope: &TenantCtx, name: &str) -> Result<Vec<u8>, String>;

    // Provided methods
    fn write(
        &self,
        scope: &TenantCtx,
        name: &str,
        bytes: &[u8],
    ) -> Result<(), String> { ... }
    fn delete(&self, scope: &TenantCtx, name: &str) -> Result<(), String> { ... }
}
Expand description

Host-facing secrets-store trait mirroring greentic:secrets/store@1.0.0.

Required Methods§

Source

fn read(&self, scope: &TenantCtx, name: &str) -> Result<Vec<u8>, String>

Read bytes for the scoped secret name.

Provided Methods§

Source

fn write( &self, scope: &TenantCtx, name: &str, bytes: &[u8], ) -> Result<(), String>

Upsert bytes for the scoped secret name. Defaults to an error when not implemented.

Source

fn delete(&self, scope: &TenantCtx, name: &str) -> Result<(), String>

Delete the scoped secret. Defaults to an error when not implemented.

Implementors§