notification

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v1.5.0

func Init(uri string) error

Init creates a notifier regarding the URI.

func Notify added in v1.5.0

func Notify(work *model.WorkRequest)

Notify is the global method to notify work

Types

type HTTPNotifier

type HTTPNotifier struct {
	URL          *url.URL
	PrefixFilter string
}

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

func (*HTTPNotifier) Notify

func (n *HTTPNotifier) Notify(work *model.WorkRequest) error

Notify send a notification to a HTTP endpoint.

type Notifier

type Notifier interface {
	Notify(work *model.WorkRequest) error
}

Notifier is able to send a notification.

type SMTPNotifier

type SMTPNotifier struct {
	Host         string
	From         string
	To           string
	PrefixFilter string
}

SMTPNotifier is able to send notifcation to a email destination.

func (*SMTPNotifier) Notify

func (n *SMTPNotifier) Notify(work *model.WorkRequest) error

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