client

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2019 License: MIT Imports: 9 Imported by: 6 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Enabled() bool
	SendEmail(context.Context, *Email) error
}

App of package

func New

func New(config Config) App

New creates new App from Config

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string) Config

Flags adds flags for configuring package

type Email

type Email struct {
	// contains filtered or unexported fields
}

Email describes an email to be sent

func NewEmail

func NewEmail(mailer App) *Email

NewEmail create a new email

func (*Email) As

func (e *Email) As(sender string) *Email

As set sender

func (*Email) Data

func (e *Email) Data(data interface{}) *Email

Data set payload

func (*Email) From

func (e *Email) From(from string) *Email

From set from

func (*Email) Send

func (e *Email) Send(ctx context.Context) error

Send email

func (*Email) Template

func (e *Email) Template(template string) *Email

Template set template

func (*Email) To

func (e *Email) To(recipients ...string) *Email

To add recipients to list

func (*Email) WithSubject

func (e *Email) WithSubject(subject string) *Email

WithSubject set subject

Jump to

Keyboard shortcuts

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