customer

package
v0.0.0-...-7de2586 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeEmailEvent

type ChangeEmailEvent struct {
	ID              int64  `json:"id"`
	Name            string `json:"name"`
	ExistingEmail   string `json:"existing_email"`
	NewEmail        string `json:"new_email"`
	VerficationLink string `json:"verification_link"`
}

type CustomerUseCase

type CustomerUseCase interface {
	OnSignUp(ctx context.Context, event SignUpEvent) error
	OnChangeEmail(ctx context.Context, event ChangeEmailEvent) error
}

func NewCustomerUseCase

func NewCustomerUseCase(props CustomerUseCaseProperty) CustomerUseCase

type CustomerUseCaseProperty

type CustomerUseCaseProperty struct {
	AppName     string
	Logger      *logrus.Logger
	EmailSender string
	Mailer      mailer.Mailer
}

type SignUpEvent

type SignUpEvent struct {
	ID                 int64     `json:"id"`
	Name               string    `json:"name"`
	Email              string    `json:"email"`
	VerificationStatus string    `json:"verification_status"`
	MemberStatus       string    `json:"member_status"`
	VerificationLink   string    `json:"verification_link"`
	CreatedAt          time.Time `json:"created_at"`
}

type SignUpEventHandler

type SignUpEventHandler struct {
	CustomerUseCase CustomerUseCase
}

func (SignUpEventHandler) Handle

func (handler SignUpEventHandler) Handle(ctx context.Context, msg interface{}) error

Jump to

Keyboard shortcuts

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