package
0.10.0
Repository: https://github.com/qri-io/qri.git
Documentation: pkg.go.dev

# Functions

EmptyOkHandler is an empty 200 response, often used for OPTIONS requests that responds with headers set in addCorsHeaders.
HealthCheckHandler is a basic "hey I'm fine" for load balancers & co TODO - add Database connection & proper configuration checks here for more accurate health reporting.
NewAPIError returns a new APIError.
NewOrder constructs a basic order struct.
NewOrderByFromString converts a commaa delimited string to an OrderBy struct.
NewPage constructs a basic page struct, setting sensible defaults.
NewPageFromOffsetAndLimit converts a offset and Limit to a Page struct.
NotFoundHandler is a JSON 404 response.
OrderByFromRequest extracts orderBy params from an http request.
OrderByFromRequestWithKeys extracts orderBy params from an http request and only takes the specified keys.
PageFromRequest extracts pagination params from an http request.
ReqParamBool pulls a boolean parameter from a request form value.
ReqParamInt extracts an integer parameter from a request form value.
RespondWithDispatchTypeError writes an error describing a type mismatch error from using dispatch.
RespondWithError writes the error, with meaningful text, to the http response.
WriteErrResponse writes a JSON error response message & HTTP status.
WriteMessageResponse includes a message with a data response.
WritePageResponse wraps response data and pagination information in an envelope and writes it.
WriteResponse wraps response data in an envelope & writes it.

# Variables

DefaultMaxPageSize is the max size a page can be by default, set to -1 to ignore maximum sizes.
DefaultPageSize is the number NewPage.
OrderASC defines the ascending order keyword.
OrderDESC defines the descending order keyword.

# Structs

APIError is an error that specifies its http status code.
Meta is the JSON API response meta object wrapper.
Order represents ordering information for a single key.
Page represents pagination information.
Response is the JSON API response object wrapper.

# Type aliases

OrderBy represents ordering information.