# Functions
CheckError reads the http.Response and returns an error if one exists.
CheckErrorStatus for status and any error in the response.
ErrorCodeToStatusCode maps an influxdb error code string to a http status code integer.
NewAPI creates a new API type.
OrgIDFromContext ....
SetCORS configures various headers to relax CORS browser checks
Browsers implement Cross-Origin Resource Sharing (CORS) checks to limit cross-origin accesses in HTTP requests.
StatusCodeToErrorCode maps a http status code integer to an influxdb error code string.
ValidResource make sure a resource exists when a sub system needs to be mounted to an api.
WithEncodeGZIP sets the encoder to gzip contents.
WithErrFn sets the err handling func for issues when writing to the response body.
WithLog sets the logger.
WithOKErrFn is an error handler for failing validation for request bodies.
WithPrettyJSON sets the json encoder to marshal indent or not.
WithUnmarshalErrFn sets the error handler for errors that occur when unmarshalling the request body.
# Structs
API provides a consolidated means for handling API interface concerns.
ErrBody is an err response body.
ErrorHandler is the error handler in http package.
FeatureHandler is used to switch requests between an existing and a feature flagged HTTP Handler on a per-request basis.
# Interfaces
Enabler allows the switching between two HTTP Handlers.
ResourceHandler is an HTTP handler for a resource.
# Type aliases
APIOptFn is a functional option for setting fields on the API type.
Middleware constructor.