Skip to main content

SecretResolver

Trait SecretResolver 

Source
pub trait SecretResolver: Send + Sync {
    // Required method
    fn resolve(
        &self,
        name: &str,
        config: &SecretConfig,
    ) -> Result<String, SecretError>;
}
Expand description

Trait for resolving secrets from various sources

Implement this trait to support custom secret providers like Vault, AWS Secrets Manager, 1Password, etc.

Required Methods§

Source

fn resolve( &self, name: &str, config: &SecretConfig, ) -> Result<String, SecretError>

Resolve a single secret by name and configuration

§Arguments
  • name - The logical name of the secret
  • config - Configuration specifying the source
§Errors

Returns SecretError if the secret cannot be resolved.

Implementors§