Documentation
¶
Overview ¶
Package audit is the change log every real product needs — a record of the operator actions that mutate config or data (account changes, key create/revoke, retention, data clears). Append-only JSONL, bounded in memory, compacted on boot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Time time.Time `json:"time"`
Action string `json:"action"`
Detail string `json:"detail"`
}
Entry is one logged action.
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log is a concurrency-safe, persisted audit log.
func Open ¶
Open loads the log (keeping the most recent maxEntries) and compacts the file on boot so it can't grow without bound. Empty path = in-memory only.
Click to show internal directories.
Click to hide internal directories.