logger

package
v0.0.0-...-7ff62be Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApprovalDecisionApprove = "approve"
	ApprovalDecisionDismiss = "dismiss"
)
View Source
const (
	ValueTypeUser               = "user"
	ValueTypeRole               = "role"
	ValueTypePlayList           = "playlist"
	ValueTypeEventFilter        = "eventfilter"
	ValueTypeScenario           = "scenario"
	ValueTypeMetaalarmRule      = "metaalarmrule"
	ValueTypeDynamicInfo        = "dynamicinfo"
	ValueTypeEntity             = "entity"
	ValueTypeEntityService      = "entityservice"
	ValueTypeEntityCategory     = "entitycategory"
	ValueTypePbehaviorType      = "pbehaviortype"
	ValueTypePbehaviorReason    = "pbehaviorreason"
	ValueTypePbehaviorException = "pbehaviorexception"
	ValueTypePbehavior          = "pbehavior"
	ValueTypeJobConfig          = "jobconfig"
	ValueTypeJob                = "job"
	ValueTypeInstruction        = "instruction"
	ValueTypeStateSetting       = "statesetting"
	ValueTypeBroadcastMessage   = "broadcastmessage"
	ValueTypeIdleRule           = "idlerule"
	ValueTypeView               = "view"
	ValueTypeViewTab            = "viewtab"
	ValueTypeWidget             = "widget"
	ValueTypeWidgetFilter       = "widgetfilter"
	ValueTypeWidgetTemplate     = "widgettemplate"
	ValueTypeViewGroup          = "viewgroup"
	ValueTypeResolveRule        = "resolverule"
	ValueTypeFlappingRule       = "flappingrule"
	ValueTypeKpiFilter          = "kpi_filter"
	ValueTypePattern            = "pattern"
	ValueTypeMap                = "map"
	ValueTypeSnmpRule           = "snmprule"
	ValueTypeDeclareTicketRule  = "declareticketrule"
	ValueTypeLinkRule           = "linkrule"
	ValueTypeAlarmTag           = "alarmtag"
	ValueTypeColorTheme         = "colortheme"
	ValueTypeIcon               = "icon"
	ValueTypeEventRecord        = "eventrecord"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionLog

type ActionLog struct {
	OperationType     string
	ValueType         string
	ValueID           string
	Timestamp         time.Time
	CurDocument       map[string]any
	PrevDocument      map[string]any
	UpdateDescription map[string]any
}

func (*ActionLog) GetCurAuthor

func (l *ActionLog) GetCurAuthor() string

func (*ActionLog) GetPrevAuthor

func (l *ActionLog) GetPrevAuthor() string

func (*ActionLog) GetPrevCreated

func (l *ActionLog) GetPrevCreated() time.Time

type ActionLogEvent

type ActionLogEvent struct {
	DocumentID        string         `bson:"document_id"`
	Collection        string         `bson:"collection"`
	OperationType     string         `bson:"operation_type"`
	Document          map[string]any `bson:"document"`
	DocumentBefore    map[string]any `bson:"document_before"`
	UpdateDescription map[string]any `bson:"update_description"`
	ClusterTime       time.Time      `bson:"cluster_time"`
}

type ActionLogger

type ActionLogger interface {
	Watch(ctx context.Context) error
}

func NewActionLogger

func NewActionLogger(
	dbClient mongo.DbClient,
	redisLockClient libredis.LockClient,
	pgPoolProvider postgres.PoolProvider,
	zLog zerolog.Logger,
	retryCount int,
	retryTimeout time.Duration,
) ActionLogger

Jump to

Keyboard shortcuts

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