Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInternalError = NewHTTPError(500, "Internal Error") ErrInvalidParam = NewHTTPError(400, "Bad Request") ErrUnauthorized = NewHTTPError(401, "Unauthorized") // ErrForbidden ... ErrForbidden = NewHTTPError(403, "Forbidden") // ErrNotFound ... ErrNotFound = NewHTTPError(404, "Request Not Found") InvalidDataInRequest = "invalid data json in request" // ResponseError export common response error, can use addErr to add error replace default error RespnseError = NewHTTPError(4000, "Response Error") )
Functions ¶
func ErrorMessage ¶
ErrorMessage returns the code and message for Gins JSON helpers
Types ¶
type HTTPError ¶
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError ...
func NewHTTPError ¶
NewHTTPError ...
Click to show internal directories.
Click to hide internal directories.