audit

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Add(ctx context.Context, record Record) error
	AddMultiple(ctx context.Context, records []Record) error
	Init() error
	MustInit() Manager
}

func New

func New(db db.Manager, opts ...common.Option[manager]) Manager

type Record

type Record struct {
	Id              int64                  `db:"id"`
	Action          string                 `db:"action"`
	CreatedById     string                 `db:"created_by_id"`
	CreatedByName   string                 `db:"created_by_name"`
	Role            string                 `db:"role"`
	BeforeChanged   map[string]interface{} `db:"before_changed"`
	AfterChanged    map[string]interface{} `db:"after_changed"`
	AdditionalProps map[string]interface{} `db:"additional_props"`
	Notes           string                 `db:"notes"`
	CreatedAt       *time.Time             `db:"created_at"`
}

Jump to

Keyboard shortcuts

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