mailer

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: 12 Imported by: 0

Documentation

Overview

Package mailer is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValidateSmtpUser     = errors.New("[mailer] invalid value to smtp user")
	ErrValidateSmtpPassword = errors.New("[mailer] invalid value to smtp password")
	ErrValidateSmtpHost     = errors.New("[mailer] invalid value to smtp host")
	ErrValidateSmtpPort     = errors.New("[mailer] invalid value to smtp port")
	ErrValidateFromName     = errors.New("[mailer] invalid value to from name")
	ErrValidateFromEmail    = errors.New("[mailer] invalid value to from email")
	ErrValidateTemplatePath = errors.New("[mailer] invalid value to templates path")
)

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	Validate() error
	Send(to []string, subject, filename string, data map[string]interface{}) error
	SendAttachment(to []string, subject, templateFile string, data map[string]interface{}, attachments map[string][]byte) error
	SetTemplateSettings(templatePath, templateBase string, settings map[string]string)
}

func NewMailer

func NewMailer(smtpUser, smtpPassword, smtpHost, smtpPort, fromName, fromEmail string) Mailer

type MockMailer

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

MockMailer is a mock of Mailer interface.

func NewMockMailer

func NewMockMailer(ctrl *gomock.Controller) *MockMailer

NewMockMailer creates a new mock instance.

func (*MockMailer) EXPECT

func (m *MockMailer) EXPECT() *MockMailerMockRecorder

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

func (*MockMailer) Send

func (m *MockMailer) Send(to []string, subject, filename string, data map[string]interface{}) error

Send mocks base method.

func (*MockMailer) SendAttachment

func (m *MockMailer) SendAttachment(to []string, subject, templateFile string, data map[string]interface{}, attachments map[string][]byte) error

SendAttachment mocks base method.

func (*MockMailer) SetTemplateSettings

func (m *MockMailer) SetTemplateSettings(templatePath, templateBase string, settings map[string]string)

SetTemplateSettings mocks base method.

func (*MockMailer) Validate

func (m *MockMailer) Validate() error

Validate mocks base method.

type MockMailerMockRecorder

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

MockMailerMockRecorder is the mock recorder for MockMailer.

func (*MockMailerMockRecorder) Send

func (mr *MockMailerMockRecorder) Send(to, subject, filename, data interface{}) *gomock.Call

Send indicates an expected call of Send.

func (*MockMailerMockRecorder) SendAttachment

func (mr *MockMailerMockRecorder) SendAttachment(to, subject, templateFile, data, attachments interface{}) *gomock.Call

SendAttachment indicates an expected call of SendAttachment.

func (*MockMailerMockRecorder) SetTemplateSettings

func (mr *MockMailerMockRecorder) SetTemplateSettings(templatePath, templateBase, settings interface{}) *gomock.Call

SetTemplateSettings indicates an expected call of SetTemplateSettings.

func (*MockMailerMockRecorder) Validate

func (mr *MockMailerMockRecorder) Validate() *gomock.Call

Validate indicates an expected call of Validate.

Jump to

Keyboard shortcuts

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