Documentation
¶
Index ¶
- Constants
- func CheckNickName(nickname string) bool
- func CheckPassport(passport string) bool
- func GetProfile(session *ghttp.Session) (u *user.Entity)
- func IsSignedIn(session *ghttp.Session) bool
- func Register(data *VoRegisterRequest) error
- func SignIn(passport, password string, session *ghttp.Session) error
- func SignOut(session *ghttp.Session) error
- type VoCheckNickName
- type VoCheckPassport
- type VoCurrentUser
- type VoRegisterRequest
- type VoSignIn
Constants ¶
View Source
const (
SessionMarkUser = "user_info"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VoCurrentUser ¶
type VoCurrentUser struct { Name string `json:"name" v:""` Avatar string `json:"avatar" v:""` UserId string `json:"userid" v:""` Email string `json:"email" v:""` Signature string `json:"signature" v:""` Title string `json:"title" v:""` Group string `json:"group" v:""` Tags map[string]string `json:"tags" v:""` NotifyCount int `json:"notifyCount" v:""` UnreadCount int `json:"unreadCount" v:""` Geographic map[string]interface{} `json:"geographic" v:""` Address string `json:"address" v:""` Phone string `json:"phone" v:""` }
当前登录的用户信息,用于前后端交互参数格式约定
type VoRegisterRequest ¶
type VoRegisterRequest struct { Passport string `v:"required|length:6,16#账号不能为空|账号长度应当在:min到:max之间"` Password string `v:"required|length:6,16#请输入确认密码|密码长度应当在:min到:max之间"` Password2 string `v:"required|length:6,16|same:Password#密码不能为空|密码长度应当在:min到:max之间|两次密码输入不相等"` Nickname string }
注册输入对象,用于前后端交互参数格式约定
Click to show internal directories.
Click to hide internal directories.