pub trait Database {
Show 16 methods // Required methods fn view_all_secrets<'life0, 'async_trait>( &'life0 self, user: User, tag: Option<String> ) -> Pin<Box<dyn Future<Output = Result<Vec<SecretInfo>, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn view_secret_decrypted<'life0, 'async_trait>( &'life0 self, user: User, key: String ) -> Pin<Box<dyn Future<Output = Result<String, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn view_secret<'life0, 'async_trait>( &'life0 self, user: User, key: String ) -> Pin<Box<dyn Future<Output = Result<EncryptedSecret, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_secret<'life0, 'async_trait>( &'life0 self, secret: CreateSecretParams ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_secret<'life0, 'async_trait>( &'life0 self, key: String, secret: EncryptedSecret ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete_secret<'life0, 'async_trait>( &'life0 self, key: String ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn view_users<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<User>, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn view_user_by_name<'life0, 'async_trait>( &'life0 self, id: String ) -> Pin<Box<dyn Future<Output = Result<User, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_user_from_password<'life0, 'async_trait>( &'life0 self, password: String ) -> Pin<Box<dyn Future<Output = Result<User, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_user<'life0, 'async_trait>( &'life0 self, name: String ) -> Pin<Box<dyn Future<Output = Result<String, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_user<'life0, 'async_trait>( &'life0 self, user: User ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn delete_user<'life0, 'async_trait>( &'life0 self, name: String ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn unlock<'life0, 'async_trait>( &'life0 self, key: String ) -> Pin<Box<dyn Future<Output = Result<bool, DatabaseError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn is_locked<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_root_key(&self) -> String; // Provided method fn get_key_data(&self) -> KeyFile { ... }
}

Required Methods§

source

fn view_all_secrets<'life0, 'async_trait>( &'life0 self, user: User, tag: Option<String> ) -> Pin<Box<dyn Future<Output = Result<Vec<SecretInfo>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn view_secret_decrypted<'life0, 'async_trait>( &'life0 self, user: User, key: String ) -> Pin<Box<dyn Future<Output = Result<String, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn view_secret<'life0, 'async_trait>( &'life0 self, user: User, key: String ) -> Pin<Box<dyn Future<Output = Result<EncryptedSecret, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_secret<'life0, 'async_trait>( &'life0 self, secret: CreateSecretParams ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn update_secret<'life0, 'async_trait>( &'life0 self, key: String, secret: EncryptedSecret ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn delete_secret<'life0, 'async_trait>( &'life0 self, key: String ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn view_users<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<User>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn view_user_by_name<'life0, 'async_trait>( &'life0 self, id: String ) -> Pin<Box<dyn Future<Output = Result<User, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_user_from_password<'life0, 'async_trait>( &'life0 self, password: String ) -> Pin<Box<dyn Future<Output = Result<User, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_user<'life0, 'async_trait>( &'life0 self, name: String ) -> Pin<Box<dyn Future<Output = Result<String, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn update_user<'life0, 'async_trait>( &'life0 self, user: User ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn delete_user<'life0, 'async_trait>( &'life0 self, name: String ) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn unlock<'life0, 'async_trait>( &'life0 self, key: String ) -> Pin<Box<dyn Future<Output = Result<bool, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn is_locked<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_root_key(&self) -> String

Provided Methods§

Implementors§