Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAccountOrPwd = errors.New("账号/邮箱/手机号或密码错误") ErrUserDuplicate = repo.ErrUserDuplicate ErrUserNotFound = repo.ErrUserNotFound )
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService interface { LoginEmailPwd(ctx context.Context, email, password string) (domain.User, error) LoginPhonePwd(ctx context.Context, phone, password string) (domain.User, error) LoginAccountPwd(ctx context.Context, account string, password string) (domain.User, error) UpdateNonSensitiveInfo(ctx context.Context, u domain.User) error UpdateAccountName(ctx context.Context, uid int64, accountName string) error FindById(ctx context.Context, uid int64) (domain.User, error) FindByIds(ctx context.Context, uids []int64) (map[int64]domain.User, error) FindByEmail(ctx context.Context, email string) (domain.User, error) FindByPhone(ctx context.Context, phone string) (domain.User, error) FindByAccount(ctx context.Context, accountName string) (domain.User, error) FindByGithubId(ctx context.Context, id int64) (domain.User, error) Create(ctx context.Context, user domain.User) (domain.User, error) ResetPwd(ctx context.Context, uid int64, newPwd string) error ChangePwd(ctx context.Context, uid int64, oldPwd, newPwd string) error }
func NewUserService ¶
func NewUserService(repo repo.UserRepo, producer event.UserProducer, l logx.Logger) UserService
Click to show internal directories.
Click to hide internal directories.