Documentation ¶
Index ¶
- type CaptchaIndexReq
- type CaptchaIndexRes
- type CommonPaginationReq
- type CommonPaginationRes
- type GetCurrentUserInfoReq
- type UpdatePasswordReq
- type UpdateUserReq
- type UpdateUserRes
- type UserBase
- type UserInfoRes
- type UserLoginReq
- type UserLoginRes
- type UserLogoutReq
- type UserLogoutRes
- type UserRegisterReq
- type UserRegisterRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptchaIndexReq ¶
type CaptchaIndexRes ¶
type CommonPaginationReq ¶
type CommonPaginationRes ¶
type GetCurrentUserInfoReq ¶
type UpdatePasswordReq ¶
type UpdatePasswordReq struct { g.Meta `path:"/user/password/update" method:"put" tags:"用户模型" summary:"修改密码"` Id int `json:"id" v:"required#用户模型ID不能为空" dc:"id"` Password string `json:"password" v:"required#用户密码不能为空" dc:"密码"` }
UpdatePasswordReq 更新
type UpdateUserReq ¶
type UpdateUserReq struct { g.Meta `path:"/user" method:"put" tags:"用户模型" summary:"更新"` Id int `json:"id" v:"required#用户模型ID不能为空" dc:"id"` UserBase }
UpdateUserReq 更新
type UpdateUserRes ¶
type UpdateUserRes struct {
Success bool `json:"success" description:"是否成功"`
}
type UserBase ¶
type UserBase struct { Username string `json:"username"` Password string `json:"password"` NickName string `json:"nick_name"` Phone string `json:"phone"` Avatar string `json:"avatar"` Sex string `json:"sex"` Email string `json:"email"` }
UserBase User基类
type UserInfoRes ¶
type UserLoginReq ¶
type UserLoginReq struct { g.Meta `path:"/user/login" method:"post" tags:"用户模型" summary:"用户登录"` UserName string `json:"username" v:"required#用户名不能为空" dc:"用户名"` Password string `json:"password" v:"required#密码不能为空" dc:"密码"` }
UserLoginReq 用户登录请求内容
type UserLoginRes ¶
UserLoginRes 用户登录请求响应
type UserLogoutReq ¶
type UserLogoutReq struct {
g.Meta `path:"/user/logout" method:"post" tags:"用户模型" summary:"用户退出登录"`
}
UserLogoutReq 用户退出登录请求
type UserRegisterReq ¶
type UserRegisterReq struct { g.Meta `path:"/user/register" method:"post" tags:"用户模型" summary:"注册"` UserBase }
UserRegisterReq 新增
type UserRegisterRes ¶
type UserRegisterRes struct {
Id int `json:"id" dc:"id"`
}
Click to show internal directories.
Click to hide internal directories.