Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PhoneLogin ¶
PhoneLogin 手机登录接口 @Summary 用户登录接口 @Description 仅限手机登录 @Tags 用户 @Produce json @Param req body PhoneLoginCredentials true "phone" @Success 200 {string} json "{"code":0,"message":"OK","data":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6Ik"}}" @Router /users/login [post]
Types ¶
type CreateRequest ¶
CreateRequest 创建用户请求
type CreateResponse ¶
type CreateResponse struct {
Username string `json:"username"`
}
CreateResponse 创建用户响应
type FollowRequest ¶
type FollowRequest struct {
UserID uint64 `json:"user_id"`
}
FollowRequest 关注请求
type ListResponse ¶
type ListResponse struct { TotalCount uint64 `json:"total_count"` HasMore int `json:"has_more"` PageKey string `json:"page_key"` PageValue int `json:"page_value"` Items interface{} `json:"items"` }
ListResponse 通用列表resp
type LoginCredentials ¶
type LoginCredentials struct { Email string `json:"email" form:"email"` Password string `json:"password" form:"password"` }
LoginCredentials 默认登录方式-邮箱
type PhoneLoginCredentials ¶
type PhoneLoginCredentials struct { Phone int64 `json:"phone" form:"phone" binding:"required" example:"13010002000"` VerifyCode int `json:"verify_code" form:"verify_code" binding:"required" example:"120110"` }
PhoneLoginCredentials 手机登录
type RegisterRequest ¶
type RegisterRequest struct { Username string `json:"username" form:"username"` Email string `json:"email" form:"email"` Password string `json:"password" form:"password"` ConfirmPassword string `json:"confirm_password" form:"confirm_password"` }
RegisterRequest 注册
type SwaggerListResponse ¶
type SwaggerListResponse struct { TotalCount uint64 `json:"totalCount"` UserList []model.UserInfo `json:"userList"` }
SwaggerListResponse 文档
type UpdateRequest ¶
UpdateRequest 更新请求
Click to show internal directories.
Click to hide internal directories.