sendgrid

package
v0.0.0-...-d989180 Latest Latest
Warning

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

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

Documentation

Overview

Package sendgrid 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 MockSendgrid

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

MockSendgrid is a mock of Sendgrid interface.

func NewMockSendgrid

func NewMockSendgrid(ctrl *gomock.Controller) *MockSendgrid

NewMockSendgrid creates a new mock instance.

func (*MockSendgrid) EXPECT

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

func (*MockSendgrid) Send

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

Send mocks base method.

type MockSendgridMockRecorder

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

MockSendgridMockRecorder is the mock recorder for MockSendgrid.

func (*MockSendgridMockRecorder) Send

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

Send indicates an expected call of Send.

type Options

type Options struct {
	ApiKey      string
	From        Email
	DynamicData DynamicData
	Templates   Templates
}

type SendRequest

type SendRequest struct {
	Template string
	To       Emails
	Data     DynamicData
}

func (*SendRequest) SetDefaultTemplateLanguage

func (s *SendRequest) SetDefaultTemplateLanguage()

type Sendgrid

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

func New

func New(opt Options) Sendgrid

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