revolt_database/models/audit_logs/ops.rs
1use revolt_result::Result;
2
3use crate::{AuditLogEntry, AuditLogQuery};
4
5#[cfg(feature = "mongodb")]
6mod mongodb;
7mod reference;
8
9#[async_trait]
10pub trait AbstractAuditLogs: Sync + Send {
11 /// Inserts an entry into the server's audit log
12 async fn insert_audit_log_entry(&self, entry: &AuditLogEntry) -> Result<()>;
13
14 /// Fetches a server's audit logs using the provided query options
15 async fn get_server_audit_logs(
16 &self,
17 server: &str,
18 query: AuditLogQuery,
19 ) -> Result<Vec<AuditLogEntry>>;
20}