Documentation
¶
Overview ¶
Package audit records an append-only, local-first history of every operation that changes a database — migrations, fleet convergence/recovery, SQL writes, and inline row edits. Each line is one JSON object in ~/.litescope/audit.log, giving an "ops layer" the provenance it needs: who changed what, when, and how it turned out. There is no server; the log lives on the operator's machine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogPath ¶
func LogPath() string
LogPath returns the audit log location. LITESCOPE_AUDIT_LOG overrides it (used by tests); otherwise it is ~/.litescope/audit.log.
Types ¶
type Entry ¶
type Entry struct {
Time time.Time `json:"time"`
Operator string `json:"operator"`
Action string `json:"action"` // e.g. "migrate.apply", "fleet.converge", "sql.write"
Target string `json:"target"` // database path or fleet name
Summary string `json:"summary"` // human-readable what-happened
Outcome string `json:"outcome"` // "ok" | "error"
Detail string `json:"detail,omitempty"`
}
Entry is one recorded operation.
Click to show internal directories.
Click to hide internal directories.