Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OK = &Errno{ HTTP: 200, Code: "", Message: "", } InternalServerError = &Errno{ HTTP: 500, Code: "InternalError", Message: "Internal server error.", } ErrPageNotFound = &Errno{ HTTP: 404, Code: "ResourceNotFound.PageNotFound", Message: "Page not found.", } ErrBind = &Errno{HTTP: 400, Code: "InvalidParameter.BindError", Message: "Error occurred while binding the request body to the struct."} ErrInvalidParameter = &Errno{HTTP: 400, Code: "InvalidParameter", Message: "Parameter verification failed."} // ErrSignToken 表示签发 JWT Token 时出错. ErrSignToken = &Errno{HTTP: 401, Code: "AuthFailure.SignTokenError", Message: "Error occurred while signing the JSON web token."} // ErrTokenInvalid 表示 JWT Token 格式错误. ErrTokenInvalid = &Errno{HTTP: 401, Code: "AuthFailure.TokenInvalid", Message: "Token was invalid."} ErrUnauthorized = &Errno{HTTP: 401, Code: "AuthFailure.Unauthorized", Message: "Unauthorized."} )
View Source
var ( // ErrUserAlreadyExist 代表用户已经存在. ErrUserAlreadyExist = &Errno{HTTP: 400, Code: "FailedOperation.UserAlreadyExist", Message: "User already exist."} // ErrUserNotFound 表示未找到用户. ErrUserNotFound = &Errno{HTTP: 404, Code: "ResourceNotFound.UserNotFound", Message: "User was not found."} // ErrPasswordIncorrect 表示密码不正确. ErrPasswordIncorrect = &Errno{HTTP: 401, Code: "InvalidParameter.PasswordIncorrect", Message: "Password was incorrect."} )
View Source
var ErrPostNotFound = &Errno{HTTP: 404, Code: "ResourceNotFound.PostNotFound", Message: "Post was not found"}
ErrPostNotFound 文章未找到.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.