v1.0 · MIT

Audit trails for Go, made effortless.

Automatic data-change capture, API call logging, and time-travel snapshots — with zero external dependencies in the core.

go get github.com/gopackx/go-audit
0core deps
3ORMs
3DBs
MITLicense
WHAT IT DOES

Everything you need to audit confidently.

INTEGRATION

Drop-in for GORM

Three lines of setup is all it takes. Register the auditor, run the migration, and plug it into your ORM. go-audit takes over from there — capturing changes, snapshots, and correlation IDs across your stack.

main.go
// Initialise the auditor
auditor, err := goaudit.New(goaudit.Config{
    DB:     db,
    Driver: goaudit.PostgreSQL,
    Tables: goaudit.Tables{
        DataChanges: "audit_logs",
        APICalls:    "api_logs",
    },
})

// Run schema migration
auditor.Migrate(ctx)

// Plug into GORM
gormdb.Use(gormadapter.New(auditor))
DIVE DEEPER

Browse the docs