Trait Database
Source pub trait Database {
Show 14 methods
// Required methods
fn view_all_secrets_admin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<EncryptedSecret>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
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<Secret, 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: EncryptedSecret,
) -> 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 rekey_all_secrets<'life0, 'async_trait>(
&'life0 self,
secrets: Vec<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 get_user_from_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,
user: User,
) -> 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;
}