sendmail

package
v0.0.0-...-d2182b9 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package sendmail is a generated GoMock package.

Index

Constants

View Source
const (
	TEMPLATE_LANGUAGE_ENUS = "en-us"
	TEMPLATE_LANGUAGE_PTBR = "pt-br"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicData

type DynamicData map[string]interface{}

type Email

type Email struct {
	Address string
	Name    string
}

type Emails

type Emails []Email

func (Emails) List

func (e Emails) List() (list []*mail.Email)

type MockSendmail

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

MockSendmail is a mock of Sendmail interface.

func NewMockSendmail

func NewMockSendmail(ctrl *gomock.Controller) *MockSendmail

NewMockSendmail creates a new mock instance.

func (*MockSendmail) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSendmail) Send

func (m *MockSendmail) Send(send SendRequest) error

Send mocks base method.

type MockSendmailMockRecorder

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

MockSendmailMockRecorder is the mock recorder for MockSendmail.

func (*MockSendmailMockRecorder) Send

func (mr *MockSendmailMockRecorder) Send(send interface{}) *gomock.Call

Send indicates an expected call of Send.

type SendRequest

type SendRequest struct {
	Template string
	To       Emails
	Data     DynamicData
}

func (*SendRequest) SetDefaultTemplateLanguage

func (s *SendRequest) SetDefaultTemplateLanguage()

type Sendmail

type Sendmail interface {
	Send(send SendRequest) (err error)
}

func NewSendmail

func NewSendmail(opt SendmailOptions) Sendmail

type SendmailOptions

type SendmailOptions struct {
	ApiKey            string
	From              Email
	GlobalDynamicData DynamicData
	Templates         Templates
}

type Templates

type Templates map[string]string

func (Templates) CheckIDExists

func (t Templates) CheckIDExists(id string) bool

func (Templates) GetID

func (t Templates) GetID(key string) string

Jump to

Keyboard shortcuts

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