mock

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeServiceMail

type FakeServiceMail struct {
	SendInBlueFn  func(ctx context.Context, subject, text string, to ...string) (string, string, error)
	SendMailgunFn func(
		ctx context.Context,
		subject, text string,
		body *string,
		to ...string,
	) (string, string, error)
	SendEmailFn func(
		ctx context.Context,
		subject, text string,
		body *string,
		to ...string,
	) (string, string, error)
	SimpleEmailFn func(
		ctx context.Context,
		subject, text string,
		body *string,
		to ...string,
	) (string, error)
	SaveOutgoingEmailsFn          func(ctx context.Context, payload *dto.OutgoingEmailsLog) error
	UpdateMailgunDeliveryStatusFn func(
		ctx context.Context,
		payload *dto.MailgunEvent,
	) (*dto.OutgoingEmailsLog, error)
	GenerateEmailTemplateFn func(name string, templateName string) string
}

FakeServiceMail defines a mock Mail service interface

func (*FakeServiceMail) GenerateEmailTemplate

func (f *FakeServiceMail) GenerateEmailTemplate(name string, templateName string) string

GenerateEmailTemplate ...

func (*FakeServiceMail) SaveOutgoingEmails

func (f *FakeServiceMail) SaveOutgoingEmails(ctx context.Context, payload *dto.OutgoingEmailsLog) error

SaveOutgoingEmails ...

func (*FakeServiceMail) SendEmail

func (f *FakeServiceMail) SendEmail(
	ctx context.Context,
	subject, text string,
	body *string,
	to ...string,
) (string, string, error)

SendEmail ...

func (*FakeServiceMail) SendInBlue

func (f *FakeServiceMail) SendInBlue(ctx context.Context, subject, text string, to ...string) (string, string, error)

SendInBlue ...

func (*FakeServiceMail) SendMailgun

func (f *FakeServiceMail) SendMailgun(
	ctx context.Context,
	subject, text string,
	body *string,
	to ...string,
) (string, string, error)

SendMailgun ...

func (*FakeServiceMail) SimpleEmail

func (f *FakeServiceMail) SimpleEmail(
	ctx context.Context,
	subject, text string,
	body *string,
	to ...string,
) (string, error)

SimpleEmail ...

func (*FakeServiceMail) UpdateMailgunDeliveryStatus

func (f *FakeServiceMail) UpdateMailgunDeliveryStatus(
	ctx context.Context,
	payload *dto.MailgunEvent,
) (*dto.OutgoingEmailsLog, error)

UpdateMailgunDeliveryStatus ...

Jump to

Keyboard shortcuts

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