biz

package
v0.0.0-...-9bd63dd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 6 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSmsCode = errors.InternalServer("ERROR", "Sms Code ERROR")
)
View Source
var ProviderSet = wire.NewSet(NewSmsUseCase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Sms

type Sms struct {
	Mobile string
}

type SmsRepo

type SmsRepo interface {
	SendSmsCode(mobile, code string) error

	Set(key string, value interface{}, expiration time.Duration) error
	Get(key string) (string, error)
	Del(key string) (int64, error)
}

type SmsUseCase

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

func NewSmsUseCase

func NewSmsUseCase(repo SmsRepo, logger log.Logger) *SmsUseCase

func (*SmsUseCase) SendCode

func (uc *SmsUseCase) SendCode(ctx context.Context, mobile string) error

func (*SmsUseCase) VerifyCode

func (uc *SmsUseCase) VerifyCode(ctx context.Context, mobile, code string) error

Jump to

Keyboard shortcuts

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