Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HeadersFromContext ¶
HeadersFromContext retrieves HTTP headers from the given context. It takes a single parameter ctx of type context.Context. It returns an http.Header containing the headers if present in the context, or nil if the context is nil or does not contain headers.
func NewHeadersMiddleware ¶
NewHeadersMiddleware creates a middleware that injects request headers into the request context. It returns a function that takes an http.Handler and returns an http.Handler. This middleware allows subsequent handlers to access the request headers from the context.
func NewQueryParamsMiddleware ¶
NewQueryParamsMiddleware creates a middleware that extracts query parameters from the URL and stores them in the request context. It returns a function that takes an http.Handler and returns an http.Handler. This middleware allows subsequent handlers to access query parameters via the request context.
func QueryParamsFromContext ¶
QueryParamsFromContext retrieves URL query parameters from the given context. It takes a single parameter ctx of type context.Context. It returns url.Values containing the query parameters if present, or nil if the context is nil or does not contain query parameters.
Types ¶
This section is empty.