Struct chamber_core::postgres::Postgres
source · pub struct Postgres {
pub pool: PgPool,
pub lock: LockedStatus,
}Fields§
§pool: PgPool§lock: LockedStatusImplementations§
Trait Implementations§
source§impl Database for Postgres
impl Database for Postgres
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 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 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 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 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 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,
username: 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
fn get_key_data(&self) -> KeyFile
Auto Trait Implementations§
impl !RefUnwindSafe for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl !UnwindSafe for Postgres
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more