notification

package
Version: v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: BSD-3-Clause Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmailAlreadySent = errors.New("email already sent")
)

Errors that are related to the Notification Service.

Functions

This section is empty.

Types

type Email

type Email struct {
	From      string   `json:"from"`
	To        []string `json:"to"`
	CC        []string `json:"cc"`
	BCC       []string `json:"bcc"`
	ReplyTo   string   `json:"reply-to"`
	Subject   string   `json:"subject"`
	Body      string   `json:"body"`
	HTML      string   `json:"html"`
	CheckSent bool     `json:"check-sent"`
}

Email represents an e-mail message.

type Service

type Service interface {
	// SendEmail sends an e-mail message and returns it's ID.
	SendEmail(email Email) (id string, err error)
	// IsEmailOptedOut returns true or false if e-mail address
	// is marked not to send any e-mail messages to.
	IsEmailOptedOut(email string) (yes bool, err error)
	// OptOutEmail marks an e-mail address not to send any e-mail messages to.
	OptOutEmail(email string) (err error)
	// RemoveOptedOutEmail removes an opt-out mark previosulu set by
	// OptOutEmail.
	RemoveOptedOutEmail(email string) (err error)
}

Service defines functions that Notification Service must implement.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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