email

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResetPasswordURLPath = "/auth/resetpassword" //#nosec
	InviteUserURLPath    = "/auth/users/create"  //#nosec

)

Variables

View Source
var ErrRateLimitExceeded = errors.New("rate limit exceeded")

Functions

This section is empty.

Types

type Emailer

type Emailer struct {
	Params  Params
	Dialer  *gomail.Dialer
	Limiter *rate.Limiter
}

func NewEmailer

func NewEmailer(p Params) *Emailer

func (*Emailer) SendEmail

func (e *Emailer) SendEmail(receivers []string, subject string, body string, attachmentFilePath []string) error

func (*Emailer) SendEmailWithLimit added in v0.63.0

func (e *Emailer) SendEmailWithLimit(receivers []string, subject string, body string, attachmentFilePath []string) error

func (*Emailer) SendInviteUserEmail added in v0.64.0

func (e *Emailer) SendInviteUserEmail(receivers []string, params map[string]string) error

func (*Emailer) SendResetPasswordEmail added in v0.64.0

func (e *Emailer) SendResetPasswordEmail(receivers []string, params map[string]string) error

type Params added in v0.64.0

type Params struct {
	SMTPHost           string
	SMTPPort           int
	UseSSL             bool
	Username           string
	Password           string
	LocalName          string
	Sender             string
	LimitEveryDuration time.Duration
	Burst              int
	LakefsBaseURL      string
}

type TemplateParams added in v0.64.0

type TemplateParams struct {
	URL string
}

Jump to

Keyboard shortcuts

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