Documentation
¶
Index ¶
- type Event
- type EventType
- type Logger
- func (l *Logger) Log(_ context.Context, event Event)
- func (l *Logger) LogAdminOp(ctx context.Context, actor, action, resource, detail string)
- func (l *Logger) LogAuth(ctx context.Context, actor, sourceIP string, success bool, detail string)
- func (l *Logger) LogComponentOp(ctx context.Context, actor, action, componentID, detail string, success bool)
- func (l *Logger) LogConfigChange(ctx context.Context, actor, resource, detail string)
- func (l *Logger) LogDataAccess(ctx context.Context, actor, resource, detail string)
- func (l *Logger) LogEscalation(ctx context.Context, actor, action, detail string, success bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Timestamp time.Time `json:"timestamp"`
Type EventType `json:"type"`
Action string `json:"action"`
Actor string `json:"actor,omitempty"`
Resource string `json:"resource,omitempty"`
Detail string `json:"detail,omitempty"`
SourceIP string `json:"source_ip,omitempty"`
Success bool `json:"success"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Event is a single audit log entry.