Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(rw http.ResponseWriter, status int, err error)
WriteError writes an error to the response writer.
func WriteResponse ¶
func WriteResponse(rw http.ResponseWriter, status int, v interface{})
WriteResponse writes a response to the response writer.
Types ¶
type HTTPError ¶
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError holds an error and an HTTP status code.
func NewHTTPError ¶
NewHTTPError returns a new HTTPError.
type HTTPHandler ¶
type HTTPHandler interface { Path() string Method() string Handler() HTTPRequestHandler }
HTTPHandler is a HTTP handler descriptor containing the context path, method, and request handler.
type HTTPRequestHandler ¶
type HTTPRequestHandler func(http.ResponseWriter, *http.Request)
HTTPRequestHandler is an HTTP handler.
Click to show internal directories.
Click to hide internal directories.