Documentation
¶
Overview ¶
Package log provides audit log querying for both local SQLite and remote API sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
Agent string
Token string
Identity string // "anonymous", "declared", "issued"
Credential string
Domain string
Method string
Environment string // "development", "staging", "production"
Status int
StatusClass string // "2xx", "4xx", "5xx", "error"
Failed bool
Blocked bool
Redacted bool
ProjectID string
Since time.Time
Until time.Time
Limit int
Offset int
}
Filter holds all options for querying audit logs.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides methods to query local and cloud audit logs.
func NewService ¶
NewService creates a new log service. If db is nil, it tries to connect to the default local SQLite DB.
func (*Service) GetLog ¶
func (s *Service) GetLog(id string) (*proxy.AuditEvent, error)
GetLog returns a single log entry by ID.
func (*Service) QueryLocal ¶
func (s *Service) QueryLocal(f Filter) ([]proxy.AuditEvent, error)
QueryLocal fetches audit events from the local SQLite database.
Click to show internal directories.
Click to hide internal directories.