notification

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPNotifier

type HTTPNotifier struct {
	URL  string
	From string
	To   string
	User []string
}

HTTPNotifier is able to send a notification to a HTTP endpoint.

func (*HTTPNotifier) Notify

func (n *HTTPNotifier) Notify(subject string, text string, attachfile string)

Notify send a notification to a HTTP endpoint.

type Notifier

type Notifier interface {
	Notify(subject string, text string, attachfile string)
}

Notifier is able to send a notification.

func NotifierFactory

func NotifierFactory() (Notifier, error)

NotifierFactory creates a notifier regarding the configuration.

type SMTPNotifier

type SMTPNotifier struct {
	Host string
	From string
	To   string
}

SMTPNotifier is able to send notifcation to a email destination.

func (*SMTPNotifier) Notify

func (n *SMTPNotifier) Notify(subject string, text string, attachfile string)

Notify send a notification to a email destination.

Jump to

Keyboard shortcuts

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