service

package
v0.0.0-...-d13da26 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidUserOrPassword = errors.New("账号/邮箱或密码不对")
View Source
var ErrUserDuplicateEmail = repository.ErrUserDuplicateEmail

Functions

This section is empty.

Types

type CodeService

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

func (*CodeService) Send

func (svc *CodeService) Send(ctx context.Context,

	biz string,
	phone string) error

Send 发验证码,我需要什么参数?

func (*CodeService) Verify

func (svc *CodeService) Verify(ctx context.Context, biz string,
	phone string, inputCode string) (bool, error)

type UserService

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

func NewUserService

func NewUserService(repo *repository.UserRepository) *UserService

func (*UserService) EditProfile

func (svc *UserService) EditProfile(ctx context.Context, p domain.Profile) error

func (*UserService) GetProfileByEmail

func (svc *UserService) GetProfileByEmail(ctx context.Context, email string) (domain.Profile, error)

func (*UserService) Login

func (svc *UserService) Login(ctx context.Context, email, password string) (domain.User, error)

func (*UserService) SignUp

func (svc *UserService) SignUp(ctx context.Context, u domain.User) error

Directories

Path Synopsis
sms

Jump to

Keyboard shortcuts

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