Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadRequest ¶
type BadRequest struct {
// contains filtered or unexported fields
}
BadRequest - HTTP error for 400 error code
func (*BadRequest) StatusCode ¶
func (e *BadRequest) StatusCode() int
func (*BadRequest) StatusMessage ¶
func (e *BadRequest) StatusMessage() string
type HTTPError ¶
type HTTPError interface { StatusCode() int StatusMessage() string ToJSON(io.Writer) error error // contains filtered or unexported methods }
HTTPError is the universal interface for all HTTPError 's it includes their StatusCode() and a StatusMessage() which contains a short description of the error
type InternalServerError ¶
type InternalServerError struct {
// contains filtered or unexported fields
}
InternalServerError - HTTP error for 500 error code
func (InternalServerError) StatusCode ¶
func (InternalServerError) StatusCode() int
StatusCode is 500 for unimplemented error status codes
func (InternalServerError) StatusMessage ¶
func (g InternalServerError) StatusMessage() string
StatusMessage looks up the already defined map[int]string from the http package containing maps of common http errors and their texts
type NotFound ¶
type NotFound struct {
// contains filtered or unexported fields
}
NotFound - HTTP error for 404 error code
func (NotFound) StatusCode ¶
func (NotFound) StatusMessage ¶
Click to show internal directories.
Click to hide internal directories.