audit

package
v0.0.0-...-1726717 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Log             *zerolog.Logger
	StorageProvider storage.Provider
}

Dependencies for the audit provider.

type Event

type Event struct {
	ActorID      string
	ActorType    string
	ActorEmail   string
	Action       string
	ResourceType string
	ResourceID   string
	IPAddress    string
	UserAgent    string
	Metadata     string
}

Event represents an audit event to be logged.

type Provider

type Provider interface {
	// LogEvent asynchronously records an audit log entry.
	// It is fire-and-forget: errors are logged but not propagated.
	LogEvent(event Event)
}

Provider is the interface for audit logging.

func New

func New(deps *Dependencies) Provider

New creates a new audit provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL