Documentation ¶
Index ¶
- Variables
- type UserBiz
- func (uu *UserBiz) ChangePassword(ctx context.Context, email string, password string, newPassword string, ...) error
- func (uu *UserBiz) DeleteUser(ctx context.Context, email string, password string, uid int64) error
- func (uu *UserBiz) GetProfileByUserID(ctx context.Context, UserID int64) (profile domain.Profile, err error)
- func (uu *UserBiz) Login(ctx context.Context, email string, password string) (domain.User, error)
- func (uu *UserBiz) SignUp(ctx context.Context, u domain.User) error
- func (uu *UserBiz) UpdateProfile(ctx context.Context, profile domain.Profile) (err error)
- type UserInteractive
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCodeDuplicateEmailNumber uint16 = 1062 ErrDuplicateEmail = errors.New("duplicate email") ErrUserNotFound = errors.New("user not found") ErrInvalidUserOrPassword = errors.New("username or password is incorrect") ErrNewPasswordAndConfirmPasswordNotMatch = errors.New("two passwords do not match") )
View Source
var ProviderSet = wire.NewSet(NewUserBiz)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type UserBiz ¶
type UserBiz struct {
// contains filtered or unexported fields
}
func NewUserBiz ¶
func NewUserBiz(ui UserInteractive, l *zap.Logger) *UserBiz
func (*UserBiz) ChangePassword ¶
func (*UserBiz) DeleteUser ¶
func (*UserBiz) GetProfileByUserID ¶
type UserInteractive ¶
type UserInteractive interface { CreateUser(ctx context.Context, u domain.User) error FindByID(ctx context.Context, id int64) (domain.User, error) FindByPhone(ctx context.Context, phone string) (domain.User, error) FindByEmail(ctx context.Context, email string) (domain.User, error) ChangePassword(ctx context.Context, email string, newPassword string) error DeleteUser(ctx context.Context, email string, uid int64) error UpdateProfile(ctx context.Context, profile domain.Profile) error GetProfile(ctx context.Context, userId int64) (domain.Profile, error) }
Click to show internal directories.
Click to hide internal directories.