modulepackage
0.0.0-20240926215053-69aed98de6b8
Repository: https://github.com/solher/toolbox.git
Documentation: pkg.go.dev
# README
Toolbox
My 87th last toolbox. This time it's perfect I promise.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
GetRequestContext returns a logger from a context.
HasKeyValues returns embedded key values from the error.
HasStack returns where the error was thrown if possible.
IsErrNotFound indicates if some requested resource was not found.
IsErrRetriable indicates if some failed operation should be retried.
IsErrValidation indicates if some requested resource was not found.
LoggerWithKeyValues wraps next and adds key values to log entries when available.
LoggerWithRequestContext wraps next and adds key values to log entries when available.
LoggerWithSentry exports errors to sentry.
LoggerWithStack wraps next and adds stacktrace to log entries when available.
NewRequestContext returns a new RequestContext middleware.
WithErrNotFound wraps an error with a behavior indicating that a requested resource was not found.
WithErrRetriable wraps an error with a behavior indicating that the failed operation should be retried.
WithErrValidation wraps an error with a behavior indicating that some user parameters were invalid.
WithKeyValues wraps an error with some key values.