feat(store): add SecretStore, ApiKey, remove Store trait

This commit is contained in:
2026-01-26 21:00:56 +05:30
parent e7fd01c0af
commit 5b4fbd5df6
4 changed files with 241 additions and 230 deletions

View File

@@ -1,10 +1,10 @@
pub mod redb;
pub mod sqlite;
pub mod toml;
use std::collections::BTreeMap;
pub trait Store {
fn image(&self, id: &str) -> Option<Vec<u8>>;
fn save_image(&mut self, id: &str, data: &[u8]);
use uuid::Uuid;
pub struct ApiKey {
inner: secrecy::SecretBox<String>,
}
pub struct SecretStore {
api_keys: BTreeMap<Uuid, ApiKey>,
}
pub struct Settings {}