Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HeaderTokenKey HTTP请求Header中的令牌Key HeaderTokenKey = "Authorization" // AvatarStoragePath 头像存储相对路径 AvatarStoragePath = "./web/public/avatar/" )
View Source
const ( RpcSuccessCode = 10000 HttpSuccessCode = 10000 HttpSuccessMessage = "SUCCESS" HttpErrorCode = 20000 HttpErrorMessage = "ERROR" HttpErrorServerBusyCode = 20001 HttpErrorServerBusyMessage = "Server is busy, please try again later" HttpErrorRpcRequestCode = 20002 HttpErrorRpcRequestMessage = "RPC failed or timeout" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpResponse ¶
type HttpResponse struct { Code int32 `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` }
HttpResponse 接口返回信息
type LoginRequest ¶
LoginRequest 登陆请求
type LoginResponse ¶
LoginResponse 登陆结果
type RegisterRequest ¶
RegisterRequest 注册请求
type UpdateProfileRequest ¶
type UpdateProfileRequest struct {
Username string `json:"username"`
}
UpdateProfileRequest 更新账户请求
Click to show internal directories.
Click to hide internal directories.