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§
Sourcefn get(&self, key: &str) -> Result<Option<String>, SecretsError>
fn get(&self, key: &str) -> Result<Option<String>, SecretsError>
Read a secret. Returns Ok(None) if no entry exists.
Sourcefn set(&self, key: &str, value: &str) -> Result<(), SecretsError>
fn set(&self, key: &str, value: &str) -> Result<(), SecretsError>
Write a secret, replacing any existing value.
Sourcefn delete(&self, key: &str) -> Result<(), SecretsError>
fn delete(&self, key: &str) -> Result<(), SecretsError>
Remove a secret. Should not error if the entry is absent.
Sourcefn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Short, human-readable name of the backend (used by doctor).