package
1.0.0
Repository: https://github.com/celbux/dataapi.git
Documentation: pkg.go.dev

# Functions

AssertCode is a convenience function for testing http requests.
Decode reads the body of an HTTP request looking for a JSON document.
DoRequest handles sending a basic HTTP request to any URL and get a response as []byte.
Encode is a convenience function for testing http requests.
IsDevAppServer will return true if we are running locally It the code is running in the cloud, then it will return false.
IsShutdown checks to see if the shutdown error is contained in the specified error value.
NewApp creates an App value that handle a set of routes for the application.
NewRequestError wraps a provided error with an HTTP status code.
NewShutdownError returns an error that causes the framework to signal a graceful shutdown.
Params returns the web call parameters from the request.
Respond converts a Go value to JSON and sends it to the client.
RespondError sends an error reponse back to the client.

# Constants

KeyValues is how request values are stored/retrieved.

# Structs

App is the entrypoint into our application and what configures our context object for each of our http handlers.
Error is used to pass an error during the request through the application with web specific context.
ErrorResponse is the form used for API responses from failures in the API.
FieldError is used to indicate an error with a specific request field.
Values represent state for each request.

# Type aliases

A Handler is a type that handles an http request within our own little mini framework.
Middleware is a function designed to run some code before and/or after another Handler.