package
2.34.1+incompatible
Repository: https://github.com/skf/go-utility.git
Documentation: pkg.go.dev
# Functions
AuthenticateMiddleware retrieves the security configuration for the matched route and handles Access Token validation and stores the token claims in the request context.
AuthorizeMiddleware retrieves the security configuration for the matched route and handles the configured authorizations.
ContentType wraps a HandlerFunc and checks the incoming content-type with a list of allowed content types.
CorsMiddleware adds CORS headers to requests.
CorsMiddleware adds CORS Origin header to responses.
ExtractUserIDFromContext extracts User ID from a context.
HandleSecureEndpoint creates a new SecurityConfig for the specified endpoint.
OpenCensusMiddleware adds request method and path template as span name.
Options takes a list of methods and headers and returns an Options HandlerFunc.
nolint: contextcheck.
TrailingSlashMiddleware removes trailing slash from URL's.
# Constants
No description provided by the author
# Variables
NilResourceFunc represents the Zero Value ResourceFunc.
# Structs
SecurityConfig represents how to authenticate and authorize a given endpoint and method.
No description provided by the author
# Type aliases
ResourceFunc takes a *http.Request and returns the resource to use for authorization.