Documentation ¶
Index ¶
- Constants
- Variables
- func CreateEventHandler(eventType string, eventHandlerReq types.AlertEventHandlerReq) (types.AlertEventHandler, error)
- func DeleteEventHandler(eventType string, eventHandlerName string) error
- func GetEventHandler(eventType string, eventHandlerName string) (types.AlertEventHandler, error)
- func ListEventHandlers(eventType string) ([]types.AlertEventHandler, error)
- func UpdateEventHandler(eventType string, eventHandlerName string, ...) (types.AlertEventHandler, error)
- type EventHandler
Constants ¶
View Source
const ( SlackType = "slack" SMTPType = "smtp" POSTType = "post" )
Variables ¶
View Source
var (
EventTypes = map[string]EventHandler{SlackType: slack.SlackHandler{}, SMTPType: smtp.SmtpHandler{}}
)
Functions ¶
func CreateEventHandler ¶
func CreateEventHandler(eventType string, eventHandlerReq types.AlertEventHandlerReq) (types.AlertEventHandler, error)
func DeleteEventHandler ¶
func GetEventHandler ¶
func GetEventHandler(eventType string, eventHandlerName string) (types.AlertEventHandler, error)
func ListEventHandlers ¶
func ListEventHandlers(eventType string) ([]types.AlertEventHandler, error)
func UpdateEventHandler ¶
func UpdateEventHandler(eventType string, eventHandlerName string, eventHandlerReq types.AlertEventHandlerReq) (types.AlertEventHandler, error)
Types ¶
type EventHandler ¶
type EventHandler interface { ListEventHandlers() ([]types.AlertEventHandler, error) GetEventHandler(name string) (types.AlertEventHandler, error) CreateEventHandler(createOpts types.AlertEventHandlerReq) (types.AlertEventHandler, error) UpdateEventHandler(name string, updateOpts types.AlertEventHandlerReq) (types.AlertEventHandler, error) DeleteEventHandler(name string) error }
Click to show internal directories.
Click to hide internal directories.