1use async_trait::async_trait;
3use super::model::{Entry, GetFilter};
4#[async_trait]
5pub trait MeStore: Send + Sync {
6 async fn create_identity(&self, username: &str, public_key: &str, encrypted_private_key: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>>;
8 async fn load_keys(&self, username: &str) -> Result<(String , String ), Box<dyn std::error::Error + Send + Sync>>;
9 async fn update_encrypted_private(&self, username: &str, encrypted: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>>;
10 async fn insert(&self, verb: &str, context_id: &str, key: &str, value: &str, timestamp: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>>;
12 async fn get(&self, filter: &GetFilter) -> Result<Vec<Entry>, Box<dyn std::error::Error + Send + Sync>>;
13}