Skip to main content

AuditStore

Trait AuditStore 

Source
pub trait AuditStore: Send + Sync {
    // Required methods
    fn append<'life0, 'async_trait>(
        &'life0 self,
        event: AuditEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuditStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list<'life0, 'life1, 'async_trait>(
        &'life0 self,
        opts: &'life1 AuditListOptions,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AuditEvent>, AuditStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Audit event store: append-only log with optional list by user/cube/time and pagination.

Required Methods§

Source

fn append<'life0, 'async_trait>( &'life0 self, event: AuditEvent, ) -> Pin<Box<dyn Future<Output = Result<(), AuditStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append one audit event.

Source

fn list<'life0, 'life1, 'async_trait>( &'life0 self, opts: &'life1 AuditListOptions, ) -> Pin<Box<dyn Future<Output = Result<Vec<AuditEvent>, AuditStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List events with optional filters and limit/offset. Newest first.

Implementors§