email

package
v0.0.0-...-e6b7f3d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedSendEmail = errors.New("failed to send email")

Functions

This section is empty.

Types

type Email

type Email interface {
	SendConfirm(string, string, string, string) error
	SendResetPassword(string, string, string, string) error
}

type Mock

type Mock struct{}

func NewMock

func NewMock() *Mock

func (*Mock) SendConfirm

func (m *Mock) SendConfirm(_, _, _, _ string) error

SendConfirm for new user or resend request

func (*Mock) SendResetPassword

func (m *Mock) SendResetPassword(_, _, _, _ string) error

SendResetPassword if a user forget his

type Production

type Production struct {
	Secret  string
	BaseURL string
	// contains filtered or unexported fields
}

Service to send email using sendgrid provider

func NewProduction

func NewProduction(secret, baseURL string, templateBox *rice.Box) *Production

func (*Production) SendConfirm

func (p *Production) SendConfirm(to, firstName, lastName, token string) error

SendConfirm for new user or resend request

func (*Production) SendResetPassword

func (p *Production) SendResetPassword(to, firstName, lastName, token string) error

SendResetPassword if a user forget his

Jump to

Keyboard shortcuts

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