Skip to main content

KeyringStore

Trait KeyringStore 

Source
pub trait KeyringStore: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Result<Option<String>, SecretsError>;
    fn set(&self, key: &str, value: &str) -> Result<(), SecretsError>;
    fn delete(&self, key: &str) -> Result<(), SecretsError>;
    fn backend_name(&self) -> &'static str;
}
Expand description

Abstract secret store; concrete implementations may use the OS keyring, a JSON file under ~/.deepseek/secrets/, or an in-memory map (tests).

Required Methods§

Source

fn get(&self, key: &str) -> Result<Option<String>, SecretsError>

Read a secret. Returns Ok(None) if no entry exists.

Source

fn set(&self, key: &str, value: &str) -> Result<(), SecretsError>

Write a secret, replacing any existing value.

Source

fn delete(&self, key: &str) -> Result<(), SecretsError>

Remove a secret. Should not error if the entry is absent.

Source

fn backend_name(&self) -> &'static str

Short, human-readable name of the backend (used by doctor).

Implementors§