Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectorTokenAuth ¶
func CollectorTokenAuth(storer tokens.TokenStorer, log *zap.SugaredLogger) func(next http.Handler) http.Handler
CollectorTokenAuth is a middleware which returns a HTTP 403 response if the provided token header x-iamzero-token does not match a token from the TokerStorer
func Logger ¶
Logger is a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return.
func TokenFromContext ¶
TokenFromContext loads the token from the request context. REQUIRES that middleware.CollectorTokenAuth() middleware has run. Can only be used after the middleware is used in the Go router.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.