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.
Click to show internal directories.
Click to hide internal directories.