#[cfg(feature = "diesel")]
pub(in crate::biome) mod diesel;
pub mod error;
#[cfg(feature = "postgres")]
pub use self::diesel::postgres::PostgresKeyStore;
pub use error::KeyStoreError;
pub trait KeyStore<T>: Sync + Send {
fn add_key(&self, key: T) -> Result<(), KeyStoreError>;
fn update_key(
&self,
public_key: &str,
user_id: &str,
new_display_name: &str,
) -> Result<(), KeyStoreError>;
fn remove_key(&self, public_key: &str, user_id: &str) -> Result<T, KeyStoreError>;
fn fetch_key(&self, public_key: &str, user_id: &str) -> Result<T, KeyStoreError>;
fn list_keys(&self, user_id: Option<&str>) -> Result<Vec<T>, KeyStoreError>;
}