hook

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	Triggers       []string                  `bson:"triggers" json:"triggers"`
	AlarmPatterns  pattern.AlarmPatternList  `bson:"alarm_patterns" json:"alarm_patterns"`
	EventPatterns  pattern.EventPatternList  `bson:"event_patterns" json:"event_patterns"`
	EntityPatterns pattern.EntityPatternList `bson:"entity_patterns" json:"entity_patterns"`
}

Hook represents the conditions when the hook must be triggered

func (*Hook) IsTriggeredByAlarmChange

func (h *Hook) IsTriggeredByAlarmChange(alarmChange types.AlarmChange) bool

IsTriggeredByAlarmChange checks if a hook must be activated according the triggers list defined be the user

func (*Hook) IsTriggeredByAlarmChangeType

func (h *Hook) IsTriggeredByAlarmChangeType(change types.AlarmChangeType) bool

IsTriggeredByAlarmChangeType checks if a hook must be activated accoding the triggers list defined be the user

func (*Hook) IsTriggeredByEvent

func (h *Hook) IsTriggeredByEvent(event types.Event) bool

IsTriggeredByEvent checks if a hook must be activated according an event

Jump to

Keyboard shortcuts

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