pub struct PostgresStorage { /* private fields */ }Expand description
PostgreSQL audit storage (for enterprise deployments)
Implementations§
Source§impl PostgresStorage
impl PostgresStorage
Sourcepub fn new(config: PostgresStorageConfig) -> Result<Self>
pub fn new(config: PostgresStorageConfig) -> Result<Self>
Create a new PostgreSQL storage
Sourcepub fn get_pool_statistics(&self) -> Result<PoolStatistics>
pub fn get_pool_statistics(&self) -> Result<PoolStatistics>
Get connection pool statistics
Trait Implementations§
Source§impl AuditStorage for PostgresStorage
impl AuditStorage for PostgresStorage
Source§fn retrieve_by_time_range(
&self,
start: DateTime<Utc>,
end: DateTime<Utc>,
) -> Result<Vec<AuditEvent>>
fn retrieve_by_time_range( &self, start: DateTime<Utc>, end: DateTime<Utc>, ) -> Result<Vec<AuditEvent>>
Retrieve events by time range
Source§fn retrieve_by_type(
&self,
event_type: &AuditEventType,
) -> Result<Vec<AuditEvent>>
fn retrieve_by_type( &self, event_type: &AuditEventType, ) -> Result<Vec<AuditEvent>>
Retrieve events by event type
Source§fn retrieve_by_severity(
&self,
severity: &AuditSeverity,
) -> Result<Vec<AuditEvent>>
fn retrieve_by_severity( &self, severity: &AuditSeverity, ) -> Result<Vec<AuditEvent>>
Retrieve events by severity
Source§fn retrieve_by_user(&self, user_id: &str) -> Result<Vec<AuditEvent>>
fn retrieve_by_user(&self, user_id: &str) -> Result<Vec<AuditEvent>>
Retrieve events by user
Source§fn get_statistics(&self) -> Result<StorageStatistics>
fn get_statistics(&self) -> Result<StorageStatistics>
Get storage statistics
Auto Trait Implementations§
impl Freeze for PostgresStorage
impl RefUnwindSafe for PostgresStorage
impl Send for PostgresStorage
impl Sync for PostgresStorage
impl Unpin for PostgresStorage
impl UnsafeUnpin for PostgresStorage
impl UnwindSafe for PostgresStorage
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
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