Documentation
¶
Index ¶
- Constants
- func LivenessHandler(w http.ResponseWriter, r *http.Request)
- func MethodNotAllowedHandler(w http.ResponseWriter, _r *http.Request)
- func NotFoundHandler(w http.ResponseWriter, _r *http.Request)
- func SendBadGateway(rw http.ResponseWriter, details map[string]string)
- func SendBadRequest(rw http.ResponseWriter, details map[string]string)
- func SendConflict(rw http.ResponseWriter, details map[string]string)
- func SendExpectationFailed(rw http.ResponseWriter, details map[string]string)
- func SendForbidden(rw http.ResponseWriter, details map[string]string)
- func SendGatewayTimeout(rw http.ResponseWriter, details map[string]string)
- func SendGone(rw http.ResponseWriter, details map[string]string)
- func SendHTTPVersionNotSupported(rw http.ResponseWriter, details map[string]string)
- func SendInternalServerError(rw http.ResponseWriter, details map[string]string)
- func SendJson(rw http.ResponseWriter, response []byte)
- func SendLengthRequired(rw http.ResponseWriter, details map[string]string)
- func SendMethodNotAllowed(rw http.ResponseWriter, details map[string]string)
- func SendNotAcceptable(rw http.ResponseWriter, details map[string]string)
- func SendNotFound(rw http.ResponseWriter, details map[string]string)
- func SendNotImplemented(rw http.ResponseWriter, details map[string]string)
- func SendPayloadTooLarge(rw http.ResponseWriter, details map[string]string)
- func SendPreconditionFailed(rw http.ResponseWriter, details map[string]string)
- func SendRangeNotSatisfiable(rw http.ResponseWriter, details map[string]string)
- func SendRequestTimeout(rw http.ResponseWriter, details map[string]string)
- func SendServiceUnavailable(rw http.ResponseWriter, details map[string]string)
- func SendText(rw http.ResponseWriter, response string)
- func SendTooManyRequests(rw http.ResponseWriter, details map[string]string)
- func SendURITooLong(rw http.ResponseWriter, details map[string]string)
- func SendUnauthorized(rw http.ResponseWriter, details map[string]string)
- func SendUnprocessableEntity(rw http.ResponseWriter, details map[string]string)
- func SendUnsupportedMediaType(rw http.ResponseWriter, details map[string]string)
- type HttpError
Constants ¶
View Source
const ( HeaderContentType = "Content-Type" ContentTypeText = "text/plain" ContentTypeJson = "application/json" )
Variables ¶
This section is empty.
Functions ¶
func LivenessHandler ¶ added in v1.1.0
func LivenessHandler(w http.ResponseWriter, r *http.Request)
func MethodNotAllowedHandler ¶
func MethodNotAllowedHandler(w http.ResponseWriter, _r *http.Request)
func NotFoundHandler ¶
func NotFoundHandler(w http.ResponseWriter, _r *http.Request)
func SendBadGateway ¶
func SendBadGateway(rw http.ResponseWriter, details map[string]string)
502 Bad Gateway
func SendBadRequest ¶
func SendBadRequest(rw http.ResponseWriter, details map[string]string)
400 Bad Request
func SendConflict ¶
func SendConflict(rw http.ResponseWriter, details map[string]string)
409 Conflict
func SendExpectationFailed ¶
func SendExpectationFailed(rw http.ResponseWriter, details map[string]string)
417 Expectation Failed
func SendForbidden ¶
func SendForbidden(rw http.ResponseWriter, details map[string]string)
403 Forbidden
func SendGatewayTimeout ¶
func SendGatewayTimeout(rw http.ResponseWriter, details map[string]string)
504 Gateway Timeout
func SendHTTPVersionNotSupported ¶
func SendHTTPVersionNotSupported(rw http.ResponseWriter, details map[string]string)
505 HTTP Version Not Supported
func SendInternalServerError ¶
func SendInternalServerError(rw http.ResponseWriter, details map[string]string)
500 Internal Server Error
func SendJson ¶
func SendJson(rw http.ResponseWriter, response []byte)
func SendLengthRequired ¶
func SendLengthRequired(rw http.ResponseWriter, details map[string]string)
411 Length Required
func SendMethodNotAllowed ¶
func SendMethodNotAllowed(rw http.ResponseWriter, details map[string]string)
405 Method Not Allowed
func SendNotAcceptable ¶
func SendNotAcceptable(rw http.ResponseWriter, details map[string]string)
406 Not Acceptable
func SendNotFound ¶
func SendNotFound(rw http.ResponseWriter, details map[string]string)
404 Not Found
func SendNotImplemented ¶
func SendNotImplemented(rw http.ResponseWriter, details map[string]string)
501 Not Implemented
func SendPayloadTooLarge ¶
func SendPayloadTooLarge(rw http.ResponseWriter, details map[string]string)
413 Payload Too Large
func SendPreconditionFailed ¶
func SendPreconditionFailed(rw http.ResponseWriter, details map[string]string)
412 Precondition Failed
func SendRangeNotSatisfiable ¶
func SendRangeNotSatisfiable(rw http.ResponseWriter, details map[string]string)
416 Range Not Satisfiable
func SendRequestTimeout ¶
func SendRequestTimeout(rw http.ResponseWriter, details map[string]string)
408 Request Timeout
func SendServiceUnavailable ¶
func SendServiceUnavailable(rw http.ResponseWriter, details map[string]string)
503 Service Unavailable
func SendText ¶
func SendText(rw http.ResponseWriter, response string)
func SendTooManyRequests ¶
func SendTooManyRequests(rw http.ResponseWriter, details map[string]string)
429 Too Many Requests
func SendURITooLong ¶
func SendURITooLong(rw http.ResponseWriter, details map[string]string)
414 URI Too Long
func SendUnauthorized ¶
func SendUnauthorized(rw http.ResponseWriter, details map[string]string)
401 Unauthorized
func SendUnprocessableEntity ¶
func SendUnprocessableEntity(rw http.ResponseWriter, details map[string]string)
422 Unprocessable Entity
func SendUnsupportedMediaType ¶
func SendUnsupportedMediaType(rw http.ResponseWriter, details map[string]string)
415 Unsupported Media Type
Types ¶
Click to show internal directories.
Click to hide internal directories.