Documentation ¶
Index ¶
- Variables
- type UserHelper
- func (h *UserHelper) CreateToken(userInfo *model.User) (string, error)
- func (h *UserHelper) CreateUser(ctx context.Context, email, password string) (*model.User, error)
- func (h *UserHelper) FindByAccount(ctx context.Context, account string) *model.User
- func (h *UserHelper) FindEmailDetail(ctx context.Context, email string) *model.UserEmail
- func (h *UserHelper) SetUserPassword(ctx context.Context, userInfo *model.User, password string) error
- func (h *UserHelper) SetUserSecondAuth(ctx context.Context, userInfo *model.User, val bool) error
- func (h *UserHelper) SumSignature(userInfo *model.User) string
- func (h *UserHelper) ValidatePassword(userInfo *model.User, password string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( UserHelperSet, )
ProviderSet is helper providers.
View Source
var UserHelperSet = wire.NewSet(wire.Struct(new(UserHelper), "*"))
Functions ¶
This section is empty.
Types ¶
type UserHelper ¶
func (*UserHelper) CreateToken ¶
func (h *UserHelper) CreateToken(userInfo *model.User) (string, error)
CreateToken 根据用户信息创建token
func (*UserHelper) CreateUser ¶
CreateUser 创建用户
func (*UserHelper) FindByAccount ¶
FindByAccount 根据账号查找用户
func (*UserHelper) FindEmailDetail ¶
func (*UserHelper) SetUserPassword ¶
func (h *UserHelper) SetUserPassword(ctx context.Context, userInfo *model.User, password string) error
SetUserPassword 设置用户密码
func (*UserHelper) SetUserSecondAuth ¶
SetUserSecondAuth 设置必须验证 遇到密码输入错误等安全情况需要强制二次验证
func (*UserHelper) SumSignature ¶
func (h *UserHelper) SumSignature(userInfo *model.User) string
SumSignature get admin data signature
func (*UserHelper) ValidatePassword ¶
func (h *UserHelper) ValidatePassword(userInfo *model.User, password string) error
ValidatePassword 验证用户密码
Click to show internal directories.
Click to hide internal directories.