Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpCodeError ¶
type HttpCodeError struct {
// contains filtered or unexported fields
}
func (*HttpCodeError) Error ¶
func (e *HttpCodeError) Error() string
func (*HttpCodeError) StatusCode ¶
func (e *HttpCodeError) StatusCode() int
StatusCode returns the HTTP status code.
type HttpJsonError ¶
type HttpJsonError struct { Message interface{} // contains filtered or unexported fields }
func (*HttpJsonError) Error ¶
func (e *HttpJsonError) Error() string
func (*HttpJsonError) StatusCode ¶
func (e *HttpJsonError) StatusCode() int
StatusCode returns the HTTP status code.
type XHTTPError ¶
type XHTTPError interface { error // StatusCode returns the HTTP status code of the error StatusCode() int }
HTTPError represents an HTTP error with HTTP status code and error message
func NewHTTPStatusCodeError ¶
func NewHTTPStatusCodeError(status int) XHTTPError
NewHTTPStatusCodeError creates a new HttpError instance. to generate the message based on the status code.
func NewJsonHTTPError ¶
func NewJsonHTTPError(status int, message interface{}) XHTTPError
NewJsonHTTPError creates a new HttpError instance. to generate the message based on the status code.
Click to show internal directories.
Click to hide internal directories.