Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserNotFound is user not found. ErrUserNotFound = errors.NotFound(v1.ErrorReason_USER_NOT_FOUND.String(), "user not found") )
View Source
var ProviderSet = wire.NewSet(NewUsercase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type User ¶
type UserRepo ¶
type UserRepo interface { CreateUser(ctx context.Context, user *User) error UpdateUserInfo(ctx context.Context, userId int64, passwd string) error UpdateAvatar(ctx context.Context, userId int64, avatar string) error UpdateEmail(ctx context.Context, userId int64, email string) error FindByID(ctx context.Context, id int64) (*User, error) FindByUserName(ctx context.Context, userName string) (*User, error) CreateTokenLinkId(ctx context.Context, id int64, token string) error GetIdByToken(ctx context.Context, token string) (int64, error) }
type UserStatus ¶
type UserStatus int8
type UserUsecase ¶
type UserUsecase struct {
// contains filtered or unexported fields
}
GreeterUsecase is a Greeter usecase.
func NewUsercase ¶
func NewUsercase(repo UserRepo, logger log.Logger) *UserUsecase
NewGreeterUsecase new a Greeter usecase.
func (*UserUsecase) AuthByPwd ¶
func (u *UserUsecase) AuthByPwd(ctx context.Context, username string, passwd string) (string, error)
缓存错误暂不处理
func (*UserUsecase) GetIdByToken ¶
Click to show internal directories.
Click to hide internal directories.