package
0.0.0-20240131041800-f54d67199237
Repository: https://github.com/dochq/helpers.git
Documentation: pkg.go.dev

# Functions

Authorize is middleware to ensure security.
No description provided by the author
function New is just your normal new function for a HTTP router, this allows the calling applicaiton to add routes specific to that microservice.
Respond is used to return data to the client with a custom http code The returned content-type will respect the Accept header for application/json, application/cbor and application/xml (and application/html and text/html if enabled with SetHTMLTemplatePaths).
RespondError is used to return errors to the client The returned content-type will respect the Accept header for application/json, application/cbor and application/xml (and application/html and text/html if enabled with SetHTMLTemplatePaths).
RespondOk is used to return data to the client with a 200 http code The returned content-type will respect the Accept header for application/json, application/cbor and application/xml (and application/html and text/html if enabled with SetHTMLTemplatePaths).
SetHTMLTemplatePaths allows the application to specify the paths to HTML tempate files that will be used for responses with HTML content-types.
No description provided by the author

# Structs

ResponseError structure holds standard fields for errors.
Simple cover for the mux router, saves another import at the service level.

# Type aliases

RespondErrorDetail allows a RespondError detail parameter to end up in the Details array.