Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Mgr = New()
Mgr is the global audit log manager instance
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // Count returns the total count of audit logs according to the query Count(ctx context.Context, query *q.Query) (total int64, err error) // List audit logs according to the query List(ctx context.Context, query *q.Query) (audits []*model.AuditLogExt, err error) // Get the audit log specified by ID Get(ctx context.Context, id int64) (audit *model.AuditLogExt, err error) // Create the audit log Create(ctx context.Context, audit *model.AuditLogExt) (id int64, err error) // Delete the audit log specified by ID Delete(ctx context.Context, id int64) (err error) // Purge delete the audit log with retention hours Purge(ctx context.Context, retentionHour int, includeOperations []string, dryRun bool) (int64, error) // UpdateUsername Replace all log records username with its hash UpdateUsername(ctx context.Context, username string, replaceWith string) error }
Manager is used for audit log management
Click to show internal directories.
Click to hide internal directories.