Documentation
¶
Overview ¶
Package audit provides the Auditor interface and supporting types for audit logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auditor ¶
type Auditor interface {
Record(ctx context.Context, entry Entry) error
RecordSuccess(ctx context.Context, entry Entry) error
RecordFailure(ctx context.Context, entry Entry, err error) error
RecordRejected(ctx context.Context, entry Entry, reason string) error
}
Auditor writes audit entries to persistent storage.
type Entry ¶
type Entry struct {
Subject *Subject
Action string
Target Target
Request any
// CorrelationID is copied into the stored details. Empty stays empty.
CorrelationID string
}
Entry represents a single audit record.
Click to show internal directories.
Click to hide internal directories.