Documentation
¶
Index ¶
Constants ¶
View Source
const (
// 上下文变量存储键名
ContextKey = "ContextKey"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatApiSetNameReq ¶
type ChatApiSetNameReq struct {
Name string `json:"type" v:"required|max-length:21#取一个响当当的名字吧|用户昵称最长为21字节"`
}
设置昵称请求
type ChatMsg ¶
type ChatMsg struct { Type string `json:"type" v:"required#消息类型不能为空"` Data interface{} `json:"data" v:""` From string `json:"name" v:""` }
Chat Msg 消息结构体
type Context ¶
type Context struct { Session *ghttp.Session // 当前Session管理对象 User *ContextUser // 上下文用户信息 }
请求上下文结构
type ContextUser ¶
请求上下文中的用户信息
type UserApiCheckNickNameReq ¶
type UserApiCheckNickNameReq struct {
Nickname string `v:"required#昵称不能为空"`
}
昵称唯一性检测请求参数,用于前后端交互参数格式约定
type UserApiCheckPassportReq ¶
type UserApiCheckPassportReq struct {
Passport string `v:"required#账号不能为空"`
}
账号唯一性检测请求参数,用于前后端交互参数格式约定
type UserApiSignInReq ¶
type UserApiSignInReq struct { Passport string `v:"required#账号不能为空"` Password string `v:"required#密码不能为空"` }
登录请求参数,用于前后端交互参数格式约定
type UserApiSignUpReq ¶
type UserApiSignUpReq 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 }
注册请求参数,用于前后端交互参数格式约定
type UserServiceSignUpReq ¶
注册输入参数
Click to show internal directories.
Click to hide internal directories.