go-auditGo Audit

Changelog

Release notes for Go Audit.

v1.0.0

  • Initial stable release
  • Core auditor backed by database/sql; zero network dependencies
  • Auto-diff on UPDATE — only changed fields stored
  • Manual entry point (RecordDataChange) for raw-SQL code paths
  • API call logging with header and JSON body redaction
  • Body truncation marker for oversized payloads
  • Transaction correlation via transaction_id and context helpers
  • Snapshot and Restore — reconstruct entity state at a past time
  • Retention via Purge(ctx, before)
  • Configurable error modes (ErrorFailLoud / ErrorFailSilent)
  • Custom table names for both audit tables
  • Field and entity exclusion
  • Dialects: PostgreSQL, MySQL, SQLite (with RegisterDialect for custom)
  • GORM adapter — full auto-hooks, soft-delete detection
  • Bun adapter — QueryHook with snapshot via WHERE-clause parsing
  • Ent adapter — mutation hook with single-row old-values
  • Query builder with typed filters (DataFilter, APIFilter)
  • In-memory Store for tests

On this page