pub struct AuditManager { /* private fields */ }Implementations§
Source§impl AuditManager
impl AuditManager
pub fn new(retention_days: u32) -> Self
pub async fn log( &self, user_id: Option<Uuid>, session_id: Option<Uuid>, action: String, resource: String, result: AuditResult, ip_address: Option<IpAddr>, user_agent: Option<String>, metadata: HashMap<String, Value>, risk_score: u8, )
pub async fn query( &self, user_id: Option<Uuid>, action: Option<String>, start_time: Option<DateTime<Utc>>, end_time: Option<DateTime<Utc>>, limit: usize, ) -> Vec<AuditLog>
pub async fn cleanup_old_logs(&self) -> Result<usize>
pub async fn get_user_activity(&self, user_id: &Uuid, days: u32) -> UserActivity
pub async fn generate_compliance_report( &self, user_id: &Uuid, ) -> ComplianceReport
Auto Trait Implementations§
impl Freeze for AuditManager
impl !RefUnwindSafe for AuditManager
impl Send for AuditManager
impl Sync for AuditManager
impl Unpin for AuditManager
impl !UnwindSafe for AuditManager
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