logger

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionCreate = "create"
	ActionUpdate = "update"
	ActionDelete = "delete"
	ActionExport = "export"
	ActionImport = "import"
)
View Source
const (
	ValueTypeUser               = "user"
	ValueTypeRole               = "role"
	ValueTypeView               = "view"
	ValueTypeViewGroup          = "viewgroup"
	ValueTypePlayList           = "playlist"
	ValueTypeEventFilter        = "eventfilter"
	ValueTypeScenario           = "scenario"
	ValueTypeMetaalarmRule      = "metaalarmrule"
	ValueTypeDynamicInfo        = "dynamicinfo"
	ValueTypeEntity             = "entity"
	ValueTypeEntityService      = "entityservice"
	ValueTypeEntityCategory     = "entitycategory"
	ValueTypePbehaviorType      = "pbehaviortype"
	ValueTypePbehaviorReason    = "pbehaviorreason"
	ValueTypePbehaviorException = "pbehaviorexception"
	ValueTypePbehavior          = "pbehavior"
	ValueTypeHeartbeat          = "heartbeat"
	ValueTypeJobConfig          = "jobconfig"
	ValueTypeJob                = "job"
	ValueTypeInstruction        = "instruction"
	ValueTypeStateSetting       = "statesetting"
	ValueTypeBroadcastMessage   = "broadcastmessage"
	ValueAssociativeTable       = "associativetable"
	ValueTypeIdleRule           = "idlerule"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionLogger

type ActionLogger interface {
	Action(c *gin.Context, logEntry LogEntry) error
	Err(err error, msg string)
}

func NewActionLogger

func NewActionLogger(dbClient mongo.DbClient, zLog zerolog.Logger) ActionLogger

type LogEntry

type LogEntry struct {
	Action    string    `bson:"action"`
	ValueType string    `bson:"value_type"`
	ValueID   string    `bson:"value_id"`
	Author    string    `bson:"author"`
	Time      time.Time `bson:"time"`
}

Jump to

Keyboard shortcuts

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