audit

package
v1.2.57 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AUDITMSG = "[%v] Action=[%s] At=[%v] By=[%v] On=[%v] Notes=[%v]"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}
var (
	CREATE       Action
	DELETE       Action
	UPDATE       Action
	ERASE        Action
	CLONE        Action
	NOTIFICATION Action
	SERVICE      Action
	SILENT       Action
	GRANT        Action
	REVOKE       Action
	PROCESS      Action
	IMPORT       Action
	EXPORT       Action
	GET          Action
	REPAIR       Action

	BACKUP Action
	LOGIN  Action
	LOGOUT Action
)

func (*Action) Code

func (a *Action) Code() string

func (*Action) Description

func (a *Action) Description() string

func (*Action) GetMessage

func (a *Action) GetMessage() string

func (*Action) Is

func (a *Action) Is(inAction Action) bool

func (*Action) IsSilent

func (a *Action) IsSilent() bool

func (*Action) NotSilent added in v1.2.53

func (a *Action) NotSilent() Action

func (*Action) SetMessage

func (a *Action) SetMessage(in string)

func (*Action) SetText

func (a *Action) SetText(in string)

func (*Action) ShortName

func (a *Action) ShortName() string

func (*Action) ShortNameRaw

func (a *Action) ShortNameRaw() string

func (*Action) Silent added in v1.2.53

func (a *Action) Silent() Action

func (*Action) Text

func (a *Action) Text() string

func (*Action) WithMessage

func (a *Action) WithMessage(in string) Action

type Audit

type Audit struct {
	CreatedAt        time.Time
	CreatedBy        string
	CreatedOn        string
	CreatedAtDisplay string
	Updates          []AuditUpdateInfo
	DeletedAt        time.Time
	DeletedBy        string
	DeletedOn        string
	DeletedAtDisplay string
	AuditSequence    int
	DBVersion        int
}

func (*Audit) Action

func (a *Audit) Action(ctx context.Context, action Action) error

func (*Audit) Spew

func (a *Audit) Spew() error

type AuditUpdateInfo

type AuditUpdateInfo struct {
	UpdatedAt        time.Time
	UpdateAction     string
	UpdatedBy        string
	UpdatedOn        string
	UpdatedAtDisplay string
	UpdateNotes      string
}

Jump to

Keyboard shortcuts

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