Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionCreate = "create" ActionUpdate = "update" ActionDelete = "delete" ActionApproval = "approval" ActionExport = "export" ActionImport = "import" )
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" ValueAssociativeTable = "associativetable" ValueTypeIdleRule = "idlerule" ValueTypeView = "view" ValueTypeViewTab = "viewtab" ValueTypeWidget = "widget" ValueTypeWidgetFilter = "widgetfilter" ValueTypeWidgetTemplate = "widgettemplate" ValueTypeViewGroup = "viewgroup" ValueTypeResolveRule = "resolverule" ValueTypeFlappingRule = "flappingrule" ValueTypeUserPreferences = "userpreferences" ValueTypeFilter = "filter" ValueTypePattern = "pattern" ValueTypeMap = "map" ValueTypeSnmpRule = "snmprule" ValueTypeSnmpMib = "snmpmib" ValueTypeDeclareTicketRule = "declareticketrule" ValueTypeLinkRule = "linkrule" ValueTypeAlarmTag = "alarmtag" ValueTypeColorTheme = "colortheme" ValueTypeIcon = "icon" )
View Source
const ApprovalDecisionApprove = "approve"
View Source
const ApprovalDecisionDismiss = "dismiss"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionLogger ¶
type ActionLogger interface { Action(ctx context.Context, userID string, 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"` ValidationTime time.Time `bson:"validation_time,omitempty"` ApproverUser string `bson:"approver_user,omitempty"` ApproverRole string `bson:"approver_role,omitempty"` Decision string `bson:"decision,omitempty"` }
Click to show internal directories.
Click to hide internal directories.