package
0.0.0-20240403073756-b8dc29d3e606
Repository: https://github.com/wtran29/go-service.git
Documentation: pkg.go.dev
# Functions
Authenticate validates a JWT from the `Authorization` header.
Authorize validates that an authenticated user has at least one role from a specified list.
Cors sets the response headers needed for Cross-Origin Resource Sharing.
Errors handles errors coming out of the call chain.
ExecuteInTransation starts a transaction around all the storage calls within the scope of the handler function.
Logger writes some information about the request to the logs in the format: TraceID : (200) GET /foo -> IP ADDR (latency).
Metrics updates program counters.
Panics recovers from panics and converts the panic to an error so it is reported in Metrics and handled in Errors.
# Variables
Set of error variables for handling user group errors.