package
0.0.0-20240616054554-7c6bf0ae3faa
Repository: https://github.com/gvre/api-sample-app.git
Documentation: pkg.go.dev
# Functions
BadRequestError writes the provided error along with a 400 http status.
Error writes the provided error along with the provided http status.
NewServer returns a pointer to a new Server.
NotFoundError writes the provided error along with a 404 http status.
Ok encodes to JSON and writes the provided response (if any) along with the httpStatus.
ServerError writes the provided error along with a 500 http status.
ValidationError writes the provided error along with a 422 http status.
# Structs
ApiError defines the standard error the API returns.
ErrorWrapper wraps an ApiError, so consumers can check for it easier.
The Server is used as a container for the most important dependencies.