audit

package
v0.0.0-...-2d50ede Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NULL enum.
	NULL = "N"

	// READ enum.
	READ = "R"

	// WRITE enum.
	WRITE = "W"

	// ALL enum.
	ALL = "A"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Audit

type Audit struct {
	// contains filtered or unexported fields
}

Audit tuple.

func NewAudit

func NewAudit(log *xlog.Log, conf *config.AuditConfig) *Audit

NewAudit creates the new audit.

func (*Audit) Close

func (a *Audit) Close()

Close used to close the audit log.

func (*Audit) Init

func (a *Audit) Init() error

Init used to create the log dir, if EXISTS we do onthing.

func (*Audit) LogReadEvent

func (a *Audit) LogReadEvent(t, user, host string, threadID uint32, query string, status uint16, affected uint64, startTime time.Time)

LogReadEvent used to handle the read-only event.

func (*Audit) LogWriteEvent

func (a *Audit) LogWriteEvent(t, user, host string, threadID uint32, query string, status uint16, affected uint64, startTime time.Time)

LogWriteEvent used to handle the write event.

Jump to

Keyboard shortcuts

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