notifier

package
v0.0.0-...-cffe6dc Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NilNotifier

type NilNotifier struct{}

NilNotifier implements the glutton.PayloadNotifier interface but does nothing.

func (*NilNotifier) Configure

func (n *NilNotifier) Configure(*iface.Settings) error

Configure does nothing.

func (*NilNotifier) Notify

func (n *NilNotifier) Notify(*iface.PayloadRecord) error

Notify does nothing.

type SMTPNotifier

type SMTPNotifier struct {
	Server   string
	Port     string
	UseTLS   bool
	From     string
	Password string
	To       string
	Subject  string
}

SMTPNotifier implements the glutton.PayloadNotifier interface and delivers notifications over SMTP.

func (*SMTPNotifier) Configure

func (s *SMTPNotifier) Configure(settings *iface.Settings) error

Configure configures this notifier according to settings.

func (*SMTPNotifier) Notify

func (s *SMTPNotifier) Notify(payload *iface.PayloadRecord) error

Notify sends notification over SMTP.

func (*SMTPNotifier) PayloadToSMTPMessage

func (s *SMTPNotifier) PayloadToSMTPMessage(payload *iface.PayloadRecord) []byte

PayloadToSMTPMessage takes payload and format it to SMTP format.

Jump to

Keyboard shortcuts

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