Documentation
¶
Overview ¶
Package audit writes the audit log (audit_logs): who did what to what, from where.
A change and its record belong in one transaction: a record written afterwards is lost when its write fails, and one written before records changes that then roll back. Services that make administrative changes therefore take an *Entry and write it inside their transaction (nil: nothing to record, e.g. a user's own change).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Actor *int64 // the user acting; nil for the system or the admin token
Action string // e.g. "admin.player_updated"
TargetType string
TargetID string
IP string
Meta map[string]any
}
Entry is one audit record.
Click to show internal directories.
Click to hide internal directories.