Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ctx ¶
type Pruner ¶
type Pruner struct {
// contains filtered or unexported fields
}
Pruner periodically deletes audit_log rows older than the configured retention.
type Publisher ¶
Publisher is the minimal interface the recorder needs to fan out realtime notifications. *events.Bus satisfies it. Optional: a nil publisher disables realtime emission without affecting audit_log writes.
type RecordReq ¶
type RecordReq struct {
AppID *int64
AppSlug string
Category string
Action string
Before []byte
After []byte
Error string
ComposeVersionID *int64
}
RecordReq is the input to Recorder.Record.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder writes audit events to the DB-backed audit_log table.
func NewRecorder ¶
NewRecorder creates a Recorder backed by the given store.
func (*Recorder) SetBus ¶
SetBus wires an optional realtime event publisher. nil disables emission. Bus errors never block or fail the originating mutation.
func (*Recorder) SetSyncTracking ¶ added in v1.4.5
SetSyncTracking sets how the recorder learns whether git sync is pushing changes. Sync-eligible rows are marked pending only while on returns true, so Activity does not show "pending" forever when git sync is off. nil (the default) marks every eligible row pending. Safe to call while recording.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package render pre-renders human-readable summaries for audit events at write time; the rendered string is stored directly in the audit_log row.
|
Package render pre-renders human-readable summaries for audit events at write time; the rendered string is stored directly in the audit_log row. |