Documentation
¶
Overview ¶
Package auditlog provides a comprehensive audit trail of all API access. It records every HTTP request, creates queryable audit events, and has a background retention cleanup.
Index ¶
- func New() plugin.Plugin
- type Config
- type Plugin
- func (p *Plugin) Info() plugin.PluginInfo
- func (p *Plugin) Init(ctx context.Context, env *plugin.Environment) error
- func (p *Plugin) Middleware(next http.Handler) http.Handler
- func (p *Plugin) Migrations() []plugin.Migration
- func (p *Plugin) RegisterRoutes(mux *http.ServeMux) error
- func (p *Plugin) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
RetentionDays int `json:"retention_days"` // default 90
}
Config controls audit-log behaviour.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements audit trail recording and querying.
func (*Plugin) Info ¶
func (p *Plugin) Info() plugin.PluginInfo
Info returns plugin metadata for discovery and documentation.
func (*Plugin) Middleware ¶
Middleware wraps every request and records an audit event.
func (*Plugin) Migrations ¶
Migrations returns the database schema for audit events.
func (*Plugin) RegisterRoutes ¶
RegisterRoutes registers HTTP routes for querying audit events.
Click to show internal directories.
Click to hide internal directories.