pub struct PostgresAuditBackend { /* private fields */ }Expand description
PostgreSQL audit backend for persistent, queryable audit logs.
Features:
- JSONB columns for metadata and state snapshots
- Optimized indexes for common query patterns
- Multi-tenancy support with tenant_id isolation
- Connection pooling via deadpool-postgres
Implementations§
Trait Implementations§
Source§impl AuditBackend for PostgresAuditBackend
impl AuditBackend for PostgresAuditBackend
Source§fn log_event<'life0, 'async_trait>(
&'life0 self,
event: AuditEvent,
) -> Pin<Box<dyn Future<Output = AuditResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log_event<'life0, 'async_trait>(
&'life0 self,
event: AuditEvent,
) -> Pin<Box<dyn Future<Output = AuditResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Log an audit event to PostgreSQL.
Source§fn query_events<'life0, 'async_trait>(
&'life0 self,
filters: AuditQueryFilters,
) -> Pin<Box<dyn Future<Output = AuditResult<Vec<AuditEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_events<'life0, 'async_trait>(
&'life0 self,
filters: AuditQueryFilters,
) -> Pin<Box<dyn Future<Output = AuditResult<Vec<AuditEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query audit events from PostgreSQL with filters.
Source§impl Clone for PostgresAuditBackend
impl Clone for PostgresAuditBackend
Source§fn clone(&self) -> PostgresAuditBackend
fn clone(&self) -> PostgresAuditBackend
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PostgresAuditBackend
impl !RefUnwindSafe for PostgresAuditBackend
impl Send for PostgresAuditBackend
impl Sync for PostgresAuditBackend
impl Unpin for PostgresAuditBackend
impl UnsafeUnpin for PostgresAuditBackend
impl !UnwindSafe for PostgresAuditBackend
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