Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReqID ¶
GetReqID extracts the request ID from the provided context. If no request ID is found, it returns an empty string.
func NewAuth ¶
NewAuth creates a middleware that validates API key authentication. It checks the Authorization header for a valid Bearer token against the provided list of valid keys. If no valid keys are configured, all requests are rejected.
func Use ¶
func Use(handler func(http.ResponseWriter, *http.Request), middlewares ...func(http.Handler) http.Handler) http.Handler
Use applies a list of middleware functions to an http.Handler. Middlewares are applied in reverse order so that the first middleware wraps the handler last, preserving the expected chaining behavior.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.