logs

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerDeviceID = schema.ControllerDeviceID
View Source
const ControllerName = schema.ControllerName
View Source
const LogDetails = schema.LogDetails
View Source
const LogField = schema.LogField
View Source
const LogItem = schema.LogItem
View Source
const LogItemID = schema.LogItemID
View Source
const LogItemName = schema.LogItemName
View Source
const LogTimestamp = schema.LogTimestamp
View Source
const LogUID = schema.LogUID
View Source
const LogsFirst = schema.LogsFirst
View Source
const LogsLast = schema.LogsLast
View Source
const LogsOID = schema.LogsOID

Variables

This section is empty.

Functions

func CanAdd added in v0.8.3

func CanAdd[T TAuthable](a auth.OpAuth, u T) error

func CanDelete added in v0.8.3

func CanDelete[T TAuthable](a auth.OpAuth, u T) error

func CanUpdate added in v0.8.3

func CanUpdate[T TAuthable](a auth.OpAuth, u T, field string, value any) error

func CanView added in v0.8.3

func CanView[T TAuthable](a auth.OpAuth, u T, field string, value any) error

Types

type LogEntry

type LogEntry struct {
	catalog.CatalogLogEntry
	Timestamp time.Time `json:"timestamp"`
	UID       string    `json:"uid"`
	Item      string    `json:"item"`
	ItemID    string    `json:"item-id"`
	ItemName  string    `json:"item-name"`
	Field     string    `json:"field"`
	Details   string    `json:"details"`
}

func NewLogEntry

func NewLogEntry(oid schema.OID, timestamp time.Time, record audit.AuditRecord) LogEntry

func (LogEntry) AsObjects

func (l LogEntry) AsObjects(a auth.OpAuth) []schema.Object

func (LogEntry) AsRuleEntity

func (l LogEntry) AsRuleEntity() (string, interface{})

func (LogEntry) CacheKey added in v0.8.10

func (l LogEntry) CacheKey() string

func (LogEntry) IsDeleted

func (l LogEntry) IsDeleted() bool

func (LogEntry) IsValid

func (l LogEntry) IsValid() bool

type Logs

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

func NewLogs

func NewLogs(entries ...LogEntry) Logs

func (*Logs) AsObjects

func (ll *Logs) AsObjects(start, max int, auth auth.OpAuth) []schema.Object

func (*Logs) Clone

func (ll *Logs) Clone() *Logs

func (*Logs) List

func (ll *Logs) List() []LogEntry

func (*Logs) Load

func (ll *Logs) Load(blob json.RawMessage) error

func (Logs) Print

func (ll Logs) Print()

func (*Logs) Received

func (ll *Logs) Received(records ...audit.AuditRecord)

func (Logs) Save

func (ll Logs) Save() (json.RawMessage, error)

func (*Logs) UpdateByOID

func (ll *Logs) UpdateByOID(auth auth.OpAuth, oid schema.OID, value string) ([]interface{}, error)

func (Logs) Validate

func (ll Logs) Validate() error

type TAuthable added in v0.8.3

type TAuthable interface {
	LogEntry

	AsRuleEntity() (string, any)
	CacheKey() string
}

Jump to

Keyboard shortcuts

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