package
1.45.2
Repository: https://github.com/armory-io/go-commons.git
Documentation: pkg.go.dev

# Packages

Package serr This package contains all the logic and helper methods for creating and serializing API Errors This is in a separate package than server so that as a developer you get better intellisense when creating errors Heavily inspired from Nike Backstopper.

# Functions

AddRequestDetailsToCtx is exposed for testing and allows tests to configure the request details when testing handler functions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExtractHeaderParamsFromRequestContext accepts a type param T and attempts to map the HTTP header's param into T.
No description provided by the author
ExtractPathParamsFromRequestContext accepts a type param T and attempts to map the HTTP request's path params into T.
ExtractPrincipalFromContext retrieves the principal from the context and returns a serr.Error.
ExtractQueryParamsFromRequestContext accepts a type param T and attempts to map the HTTP request's query params into T.
ExtractRequestDetailsFromContext fetches the server.RequestDetails from the context.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewHandler creates a Handler from a handler function and server.HandlerConfig.
No description provided by the author
No description provided by the author
SimpleResponse a convenience function for wrapping a body in a response struct with defaults Use this if you do not need to supply custom headers or override the handlers default status code.
SimpleResponseWithStatus a convenience function for wrapping a body in a response struct with defaults Use this if you do not need to supply custom headers.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProfileConfiguration defines options for turning on the golang runtime profiler and having it serve http traffic (for retrieving reports).
No description provided by the author
RequestLoggingConfiguration enable request logging, by default all requests are logged.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author