Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogMgr = &LoggerManager{}
LogMgr manage the audit log forward operations
View Source
var Mgr = New()
Mgr is the global audit log manager instance
Functions ¶
func CheckEndpointActive ¶
CheckEndpointActive check the liveliness of the endpoint
Types ¶
type LoggerManager ¶
type LoggerManager struct {
// contains filtered or unexported fields
}
LoggerManager manage the operations related to the audit log
func (*LoggerManager) DefaultLogger ¶
func (a *LoggerManager) DefaultLogger(ctx context.Context) *log.Logger
DefaultLogger ...
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.AuditLog, err error) // Get the audit log specified by ID Get(ctx context.Context, id int64) (audit *model.AuditLog, err error) // Create the audit log Create(ctx context.Context, audit *model.AuditLog) (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.