pub struct Postgres(pub PgPool);Tuple Fields§
§0: PgPoolImplementations§
Trait Implementations§
Source§impl Database for Postgres
impl Database for Postgres
fn create_secret<'life0, 'async_trait>(
&'life0 self,
new_secret: EncryptedSecret,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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 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 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<Secret, 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,
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,
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,
Auto Trait Implementations§
impl !RefUnwindSafe for Postgres
impl !UnwindSafe for Postgres
impl Freeze for Postgres
impl Send for Postgres
impl Sync for Postgres
impl Unpin for Postgres
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more