notifiers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailNotifier

type EmailNotifier struct {
}

EmailNotifier is a notifier accountable for e-mailing notifications

func (*EmailNotifier) SendMessage

func (e *EmailNotifier) SendMessage(target string, eventName string, data []byte)

SendMessage sends an event with processed data to a selected email address (target)

type MessageNotifier

type MessageNotifier interface {
	SendMessage(string, string, []byte)
}

MessageNotifier defines our interface that all our notifications need to adhere too, also handy to swap out in test

type SlackNotifier

type SlackNotifier struct {
	HookURL string
}

SlackNotifier is a notifier accountable for sending notifications to Slack

func (*SlackNotifier) SendMessage

func (s *SlackNotifier) SendMessage(target string, eventName string, data []byte)

SendMessage sends an event with processed data to a selected Slack channel (target)

type SlackPayload

type SlackPayload struct {
	Channel string `json:"channel"`
	Text    string `json:"text"`
}

Jump to

Keyboard shortcuts

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