package
0.1.7
Repository: https://github.com/go-obvious/server.git
Documentation: pkg.go.dev

# Functions

BuildLinkHeaders adds pagination Link headers to the HTTP response.
ErrInvalidRequest creates a ResponseError for invalid requests.
ErrRender creates a ResponseError for rendering errors.
GetBody deserializes the request body into the provided record or returns an error.
GetPagingOpts extracts pagination options from the HTTP request.
GetResponseError extracts a ResponseError from a given error.
HasCode checks if the given error has the specified HTTP status code.
NewErrNotFound creates a ResponseError for resource not found errors.
NewErrServer creates a ResponseError for internal server errors.
NewHTTPError creates a new ResponseError with the given error and HTTP status code.
NewResult creates a new successful Result.
Param returns the URL parameter from the request.
QS returns the query string parameter from the request.
QSAll returns all values for the query string parameter from the request.
QSDefault returns the query string parameter or a default value if not present.
Reply sends a JSON response with the given data and status code.
ReplyBytes sends a response with the given byte data and status code.
ReplyBytesGzip sends a gzipped response with the given byte data and status code.
ReplyErr sends an error response with the given error.
ReplyGzip sends a gzipped JSON response with the given data and status code.
ReplyRaw sends a raw response with the given reader and status code.
SetResponseHeaders sets the given headers on the response.
WrapRender wraps the render.Render function and handles errors.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
1MB.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Forward/Backward cursor.
ListResponse simple class to make standard response objects for list of elements.
No description provided by the author
No description provided by the author
No description provided by the author
SingleResponse simple class to make standard response objects for single element gets.

# Interfaces

No description provided by the author