package
1.0.0
Repository: https://github.com/didi/gatekeeper.git
Documentation: pkg.go.dev

# Functions

AccessHandler returns a handler that call f after each request.
FromRequest gets the logger in the request's context.
IDFromCtx returns the unique id associated to the context if any.
IDFromRequest returns the unique id associated to the request if any.
MethodHandler adds the request method as a field to the context's logger using fieldKey as field key.
NewHandler injects log into requests context.
RefererHandler adds the request's referer as a field to the context's logger using fieldKey as field key.
RemoteAddrHandler adds the request's remote address as a field to the context's logger using fieldKey as field key.
RequestHandler adds the request method and URL as a field to the context's logger using fieldKey as field key.
RequestIDHandler returns a handler setting a unique id to the request which can be gathered using IDFromRequest(req).
URLHandler adds the requested URL as a field to the context's logger using fieldKey as field key.
UserAgentHandler adds the request's user-agent as a field to the context's logger using fieldKey as field key.