package
0.2.0
Repository: https://github.com/common-fate/iamzero.git
Documentation: pkg.go.dev

# Functions

DecodeJSONBody decodes a JSON body and returns client-friendly errors.
IsShutdown checks to see if the shutdown error is contained in the specified error value.
NewRequestError wraps a provided error with an HTTP status code.
NewShutdownError returns an error that causes the framework to signal a graceful shutdown.
RespondError sends an error reponse back to the client and logs the error internally if the error is of type io.Error we send it's message back to the client.
RespondJSON converts a Go value to JSON and sends it to the client.
RespondText returns a text response back to the client.

# Structs

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.