upstreams

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upstream

type Upstream interface {
	// Send sends multiple emails to multiple clients
	Send(ctx context.Context, templateName string, tsv *models.Template, request *models.SendRequest) (resp *models.SendResponse, err error)

	// SimpleSend sends email to one client
	SimpleSend(ctx context.Context, templateName string, tsv *models.Template, recipient *models.Recipient) (status *models.SendStatus, err error)

	CheckStatus() (err error)
}

Upstream is interface for sending email

func NewDummyUpstream

func NewDummyUpstream() Upstream

NewDummyUpstream returns a new dummy email upstream. It actually does nothing, only logs actions

func NewMailgun

func NewMailgun(conn mailgun.Mailgun, msgStorage storages.MessagesStorage, senderName, senderMail string) Upstream

NewMailgun returns mail upstream which uses "Mailgun" service to send emails.

func NewSMTPUpstream

func NewSMTPUpstream(msgStorage storages.MessagesStorage, senderName string, senderMail string, smtpAddress string, smtpLogin string, smtpPassword string) Upstream

NewSMTPUpstream returns mail upstream which uses SMTP service to send emails.

Jump to

Keyboard shortcuts

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