Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangePasswordRequest ¶
type ChangePasswordRequest struct { // 旧密码. OldPassword string `json:"oldPassword" valid:"required,stringlength(6|18)"` // 新密码. NewPassword string `json:"newPassword" valid:"required,stringlength(6|18)"` }
ChangePasswordRequest 指定了 `POST /v1/users/{name}/change-password` 接口的请求参数.
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `json:"username" valid:"alphanum,required,stringlength(1|255)"` Password string `json:"password" valid:"required,stringlength(6|18)"` Nickname string `json:"nickname" valid:"required,stringlength(1|255)"` Email string `json:"email" valid:"required,email"` Phone string `json:"phone" valid:"required,stringlength(11|11)"` }
CreateUserRequest 指定了 `POST /v1/users` 接口的请求参数.
type GetUserResponse ¶
type GetUserResponse UserInfo
GetUserResponse 指定了 `GET /v1/users/{name}` 接口的返回参数.
type LoginRequest ¶
type LoginRequest struct { Username string `json:"username" valid:"alphanum,required,stringlength(1|255)"` Password string `json:"password" valid:"required,stringlength(6|18)"` }
LoginRequest 指定了 `POST /login` 接口的请求参数.
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
}
LoginResponse 指定了 `POST /login` 接口的返回参数.
Click to show internal directories.
Click to hide internal directories.