audit

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TriggerAudit_Reflect

func TriggerAudit_Reflect[T any, A any](t T, a A)

Types

type Audit

type Audit[T any] struct {
	Id          uint           `json:"id" gorm:"primary_key" copy_property:"ignore"`
	Type        string         `json:"type" binding:"required"`
	Group       string         `json:"group"`
	Status      string         `json:"status"`
	Source      string         `json:"source" binding:"required"`
	Action      string         `json:"action" binding:"required"`
	ActorId     string         `json:"actor_id"`
	ActorType   string         `json:"actor_type"`
	IpAddress   string         `json:"ip_address"`
	Environment string         `json:"environment"`
	AuditId     string         `json:"audit_id"`
	Device      trace.Device   `json:"device" gorm:"serializer:json"`
	Isp         trace.Isp      `json:"isp" gorm:"serializer:json"`
	Location    trace.Location `json:"location" gorm:"serializer:json"`
	Auditable   any            `json:"auditable" gorm:"serializer:json"`
	ExtraData   any            `json:"extra_data" gorm:"serializer:json"`
	CreatedAt   time.Time      `json:"created_at,omitempty" gorm:"<-:false"`
}

func (*Audit[T]) Resolve

func (model *Audit[T]) Resolve(baseRequest any, queryArmoury eloquent.QueryArmoury, userDetails any) *Audit[T]

func (Audit[T]) TableName

func (Audit[T]) TableName() string

type Auditor

type Auditor[T any] struct {
	BufferSize      uint64
	DateLastFlushed time.Time
	// contains filtered or unexported fields
}

func NewAuditor

func NewAuditor[T any]() Auditor[T]

func (*Auditor[T]) Audit

func (ad *Auditor[T]) Audit(t auditorInterface[T], a Audit[T])

Jump to

Keyboard shortcuts

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