Skip to main content

Crate adminx_audit

Crate adminx_audit 

Source

Structs§

AuditConfig
How the auditor behaves when it cannot write.
AuditVersionResource
Read-only view over adminx_audit_versions.
StorageAuditor
Writes audit entries through the globally registered Storage.

Constants§

TABLE
Where audit rows are written. Exposed so a deployment can point the log at a separate table (or a separate database, via a storage backend of its own).

Functions§

init
Register the auditor with adminx-core. Call after storage is set (and, on a SQL backend, after running migrate_sql).
migrate_sql
SQL CREATE TABLE IF NOT EXISTS + index statements for the audit table. Run once on a SQL backend via adminx_core::seed(adminx_audit::migrate_sql()). Mongo needs nothing (collections auto-create).
register_resources
Register the read-only in-panel log viewer at /adminx/adminx-audit-versions/list. Optional — omit it to keep the log out of the UI and query it directly.