Documentation ¶
Index ¶
- Constants
- type AuthRequest
- type ChangeAvatarReq
- type ChangeNicknameReq
- type ChangePasswordReq
- type PhoneCaptchaReq
- type RegisterRequest
- type Service
- func (svc *Service) CheckPassword(password string) error
- func (svc *Service) CheckPhoneExist(uid int64, phone string) bool
- func (svc *Service) CheckStatus(user *model.User) bool
- func (svc *Service) CreateAttachment(attachment *model.Attachment) (*model.Attachment, error)
- func (svc *Service) DoLogin(param *AuthRequest) (*model.User, error)
- func (svc *Service) EncryptPasswordAndSalt(password string) (string, string)
- func (svc *Service) GetParamSign(param map[string]interface{}, secretKey string) string
- func (s *Service) GetRandomAvatar() string
- func (svc *Service) GetSuggestUsers(keyword string) ([]string, error)
- func (svc *Service) GetUserByUsername(username string) (*model.User, error)
- func (svc *Service) GetUserInfo(param *AuthRequest) (*model.User, error)
- func (svc *Service) Register(username, password string) (*model.User, error)
- func (svc *Service) UpdateUserInfo(user *model.User) error
- func (svc *Service) ValidPassword(dbPassword, password, salt string) bool
- func (svc *Service) ValidUsername(username string) error
- type UserPhoneBindReq
Constants ¶
View Source
const LOGIN_ERR_KEY = "PaoPaoUserLoginErr"
View Source
const MAX_CAPTCHA_TIMES = 2
View Source
const MAX_LOGIN_ERR_TIMES = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
type ChangeAvatarReq ¶
type ChangeAvatarReq struct {
Avatar string `json:"avatar" form:"avatar" binding:"required"`
}
type ChangeNicknameReq ¶
type ChangeNicknameReq struct {
Nickname string `json:"nickname" form:"nickname" binding:"required"`
}
type ChangePasswordReq ¶
type PhoneCaptchaReq ¶
type RegisterRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CheckPhoneExist ¶
检测手机号是否存在
func (*Service) CreateAttachment ¶
func (svc *Service) CreateAttachment(attachment *model.Attachment) (*model.Attachment, error)
func (*Service) EncryptPasswordAndSalt ¶
密码加密&生成salt
func (*Service) GetParamSign ¶
func (*Service) GetRandomAvatar ¶
func (*Service) GetSuggestUsers ¶
根据关键词获取用户推荐
func (*Service) GetUserByUsername ¶
func (*Service) GetUserInfo ¶
func (svc *Service) GetUserInfo(param *AuthRequest) (*model.User, error)
获取用户信息
func (*Service) ValidPassword ¶
检查密码是否一致
type UserPhoneBindReq ¶
Click to show internal directories.
Click to hide internal directories.