Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is a HTTP error type that allows the sending of errors correctly.
func (Error) BadRequest ¶
BadRequest to the request with an HTTP 400 bad request error.
func (Error) Error ¶
func (e Error) Error(w http.ResponseWriter, err string, code int)
Error replies to the request with the specified error message and HTTP code. It does not otherwise end the request; the caller should ensure no further writes are done to w. The error message should be application/json.
func (Error) InternalServerError ¶
InternalServerError to the request with an HTTP 500 bad request error.
Click to show internal directories.
Click to hide internal directories.