Documentation ¶ Index ¶ func Middleware(keys ...string) func(http.Handler) http.Handler Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Middleware ¶ func Middleware(keys ...string) func(http.Handler) http.Handler Middleware creates and returns a MiddlewareFunc that validates the x-api-key header. Keys are converted to a map for O(1) lookup instead of O(n) linear search. Types ¶ This section is empty. Source Files ¶ View all Source files apikey.go Click to show internal directories. Click to hide internal directories.