biz

package
v0.0.0-...-4d27263 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 9 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewEmailUsecase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Email

type Email struct {
}

type EmailClient

type EmailClient interface {
	Send(ctx context.Context, to, subject, content string) error
}

type EmailTemplateRepo

type EmailTemplateRepo interface {
	UpsertEmailTemplate(context.Context, *adapter.UpdateEmailTemplateRequest) error
	GetEmailTemplate(context.Context, *adapter.EmailTemplate) ([]*adapter.EmailTemplate, error)
}

type EmailUsecase

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

func NewEmailUsecase

func NewEmailUsecase(emailTemplate EmailTemplateRepo,
	profileCli server.ProfileServiceClient,
	emailClient EmailClient,
) *EmailUsecase

func (*EmailUsecase) SendEmail

func (uc *EmailUsecase) SendEmail(ctx context.Context, req *adapter.SendEmailRequest) (err error)

TODO: need to remove reque

func (*EmailUsecase) UpdateEmailTemplate

func (uc *EmailUsecase) UpdateEmailTemplate(ctx context.Context, req *adapter.UpdateEmailTemplateRequest) (err error)

Jump to

Keyboard shortcuts

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