Documentation ¶
Overview ¶
Package service 代表领域服务
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDuplicateEmail = repository.ErrDuplicateUser ErrInvalidUserOrPassword = errors.New("用户不存在或者密码不对") )
View Source
var ErrCodeSendTooMany = repository.ErrCodeSendTooMany
Functions ¶
This section is empty.
Types ¶
type CodeService ¶
type CodeService interface { Send(ctx context.Context, biz, phone string) error Verify(ctx context.Context, biz, phone, inputCode string) (bool, error) }
func NewCodeService ¶
func NewCodeService(repo repository.CodeRepository, smsSvc sms.Service) CodeService
type UserService ¶
type UserService interface { Signup(ctx context.Context, u domain.User) error Login(ctx context.Context, email string, password string) (domain.User, error) UpdateNonSensitiveInfo(ctx context.Context, user domain.User) error FindById(ctx context.Context, uid int64) (domain.User, error) FindOrCreate(ctx context.Context, phone string) (domain.User, error) }
func NewUserService ¶
func NewUserService(repo repository.UserRepository) UserService
Click to show internal directories.
Click to hide internal directories.