Skip to main content

SecretProvider

Trait SecretProvider 

Source
pub trait SecretProvider:
    Send
    + Sync
    + Debug {
    // Required method
    fn get_secret(
        &self,
        tenant: &TenantId,
        key: &str,
    ) -> Result<Option<String>, ServerError>;
}
Available on crate feature multi-tenant only.
Expand description

External secret provider contract for tenant-scoped lookup.

§Examples

use http_handle::tenant_isolation::SecretProvider;
assert_eq!(1, 1);

§Panics

Trait usage does not panic by itself.

Required Methods§

Source

fn get_secret( &self, tenant: &TenantId, key: &str, ) -> Result<Option<String>, ServerError>

Fetches secret for tenant and key.

Implementors§