# Packages
Package codegen contains code generation logic to generate HTTP server and
client that wrap the generated goa endpoint and the OpenAPI 2.0 specifications
for the HTTP endpoints.
Package middleware contains HTTP middlewares that wrap a HTTP handler to
provide additional functionality.
# Functions
ErrDecodingError is the error returned when the decoder fails to decode the response body.
ErrEncodingError is the error returned when the encoder fails to encode the request body.
ErrInvalidResponse is the error returned when the service responded with an unexpected response status code.
ErrInvalidType is the error returned when the wrong type is given to a method function.
ErrInvalidURL is the error returned when the URL computed for an method is invalid.
ErrorEncoder returns an encoder that encodes errors returned by service methods.
ErrRequestError is the error returned when the request fails to be sent.
ErrValidationError is the error returned when the response body is properly received and decoded but fails validation.
NewDebugDoer wraps the given doer and captures the request and response so they can be printed.
NewErrorResponse creates a HTTP response from the given error.
NewMuxer returns a Muxer implementation based on the httptreemux router.
RequestDecoder returns a HTTP request body decoder suitable for the given request.
RequestEncoder returns a HTTP request encoder.
ResponseDecoder returns a HTTP response decoder.
ResponseEncoder returns a HTTP response encoder leveraging the mime type set in the context under the AcceptTypeKey or the ContentTypeKey if any.
SetContentType initializes the response Content-Type header given a MIME type.
# Constants
AcceptTypeKey is the context key used to store the value of the HTTP request Accept-Type header.
ContentTypeKey is the context key used to store the value of the HTTP response Content-Type header when explicitly set in the DSL.