email

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 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 AwsSesClient

type AwsSesClient interface {
	// SendEmail API operation for Amazon Simple Email Service.
	SendEmail(input *ses.SendEmailInput) (*ses.SendEmailOutput, error)
}

type DataReader

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

func NewDataReader

func NewDataReader(dir string, defaultFileName string, dataFileName string) (*DataReader, error)

func (*DataReader) Close

func (r *DataReader) Close() error

func (*DataReader) Read

func (r *DataReader) Read() (map[string]string, error)

type Message

type Message struct {
	Subject  string
	TextBody string
	HtmlBody string
}

type Service

type Service interface {
	Send(from string, to string, m *Message) error
}

func ApplyOptions

func ApplyOptions(upstream Service, opts ...ServiceOption) Service

func NewAwsSesService

func NewAwsSesService(cfg *config.AwsSesServiceConfig, opts ...ServiceOption) (Service, error)

func NewAwsSesServiceWithClient

func NewAwsSesServiceWithClient(client AwsSesClient, opts ...ServiceOption) Service

func NewPrintService

func NewPrintService(w io.Writer, opts ...ServiceOption) Service

type ServiceOption

type ServiceOption func(upstream Service) Service

func WithRateLimit

func WithRateLimit(frequency int) ServiceOption

func WithRetries

func WithRetries(retryCount int) ServiceOption

type Template

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

func NewTemplate

func NewTemplate(dir string, minifyHtml bool) (*Template, error)

func (*Template) Render

func (t *Template) Render(data any) (*Message, error)

Jump to

Keyboard shortcuts

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