Documentation ¶
Index ¶
- Constants
- func APIPing(c *gin.Context)
- func CaptchaFile(c *gin.Context)
- func CaptchaInfo(c *gin.Context)
- func InviteCodeSettable(c *gin.Context)
- func ManagerUserDeRegister(c *gin.Context)
- func ManagerUserPasswordReset(c *gin.Context)
- func ManagerUserSetStatus(c *gin.Context)
- func SetInviteCode(c *gin.Context)
- func SmsCheck(c *gin.Context)
- func SmsGetCode(c *gin.Context)
- func SmsLogin(c *gin.Context)
- func UserChangePassword(c *gin.Context)
- func UserCheckTelExist(c *gin.Context)
- func UserCheckUsernameExist(c *gin.Context)
- func UserGetInfo(c *gin.Context)
- func UserLogin(c *gin.Context)
- func UserLogout(c *gin.Context)
- func UserRegister(c *gin.Context)
- func UserResetPassword(c *gin.Context)
- func UserSetInfo(c *gin.Context)
- func UserSetName(c *gin.Context)
- func UserSmsSend(c *gin.Context)
- type CaptchaReq
- type ManagerUserDeRegisterReq
- type ManagerUserResetPwdReq
- type ManagerUserSetStatusReq
- type SMSCheckReq
- type SetInviteCodeReq
- type SmsLoginReq
- type TelCodeInfo
- type UserChangePasswordReq
- type UserLoginReq
- type UserRegisterReq
- type UserResetPasswordReq
- type UserSetInfoReq
- type UserSetNameReq
- type UserSmsSendReq
Constants ¶
View Source
const ( // LoginBizType 登录的bizType=login LoginBizType = "login" // ResetPwdBizType = "resetPwd" ResetPwdBizType = "resetPwd" )
Variables ¶
This section is empty.
Functions ¶
func ManagerUserDeRegister ¶
ManagerUserDeRegister 后台删除用户.
func ManagerUserPasswordReset ¶
ManagerUserPasswordReset 后台重置密码
func UserCheckUsernameExist ¶
UserCheckUsernameExist 检查手机号是否存在
Types ¶
type CaptchaReq ¶
type CaptchaReq struct { CaptchaID string `json:"captchaID"` CaptchaValue string `json:"captchaValue"` }
CaptchaReq Captcha请求信息
type ManagerUserDeRegisterReq ¶
type ManagerUserDeRegisterReq struct {
ID int64 `json:"id"`
}
ManagerUserDeRegisterReq 删除用户.
type ManagerUserResetPwdReq ¶
type ManagerUserResetPwdReq struct { Tel string `json:"tel" validate:"required,len=11"` Password string `json:"password" validate:"required"` // 密码md5后的值 UserType int32 `json:"userType"` }
ManagerUserResetPwdReq 用户重置密码
type ManagerUserSetStatusReq ¶
ManagerUserSetStatusReq 设置用户状态
type SMSCheckReq ¶
type SMSCheckReq struct { TelCodeInfo BizType string `json:"bizType"` }
SMSCheckReq 校验验证码.
type SetInviteCodeReq ¶
type SetInviteCodeReq struct {
InviteCode string `json:"inviteCode" validate:"required"`
}
SetInviteCodeReq 设置注册邀请码
type SmsLoginReq ¶
type SmsLoginReq struct { TelCodeInfo UserType int32 `json:"userType"` InviteCode string `json:"inviteCode"` // 邀请码. }
SmsLoginReq 短信验证登录/注册
type TelCodeInfo ¶
type TelCodeInfo struct { Tel string `json:"tel" validate:"required,len=11"` Code string `json:"code" validate:"required"` // 验证码 }
TelCodeInfo 用户验证码基础结构
type UserChangePasswordReq ¶
type UserChangePasswordReq struct { OldPassword string `json:"oldPassword" validate:"required,len=40"` // 旧的密码(hash后) Password string `json:"password" validate:"required,len=40"` // 密码sha1后的值 }
UserChangePasswordReq 用户修改密码
type UserLoginReq ¶
type UserLoginReq struct { Tel string `json:"tel" validate:"required_without=Username"` Username string `json:"username" validate:"required_without=Tel"` Password string `json:"password" validate:"required,len=40"` // 密码md5后的值 UserType int32 `json:"userType"` CaptchaReq }
UserLoginReq 用户名(手机号)+密码 登录请求.
type UserRegisterReq ¶
type UserRegisterReq struct { TelCodeInfo UserType int32 `json:"userType"` Password string `json:"password"` // 密码md5后的值 Username string `json:"username"` //用户名, 必须唯一 Nickname string `json:"nickname"` // 用户昵称, 可以重复 InviteCode string `json:"inviteCode"` // 邀请码. Profile json.RawMessage `json:"profile"` }
UserRegisterReq 用户注册请求(手机号注册)
type UserResetPasswordReq ¶
type UserResetPasswordReq struct { TelCodeInfo Password string `json:"password" validate:"required,len=40"` // 密码sha1后的值 UserType int32 `json:"userType"` }
UserResetPasswordReq 用户重置密码.
type UserSetInfoReq ¶
type UserSetInfoReq struct { Avatar string `json:"avatar"` //头像URL Nickname string `json:"nickname"` //用户名 Sex int16 `json:"sex"` //个人签名/简介 Birthday string `json:"birthday"` }
UserSetInfoReq 设置用户基本信息.
type UserSetNameReq ¶
type UserSetNameReq struct {
Username string `json:"username" validate:"required"` //用户名
}
UserSetNameReq 设置用户名(用于登录)
type UserSmsSendReq ¶
type UserSmsSendReq struct { BizType string `json:"bizType"` Tel string `json:"tel" validate:"required,len=11"` CaptchaReq }
UserSmsSendReq 用户发送短信请求结构
Click to show internal directories.
Click to hide internal directories.