Documentation ¶
Overview ¶
Package middleware defines base type for context-aware HTTP request handler. See appengine/middleware for examples of how to use it in GAE environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base func(Handler) httprouter.Handle
Base is a start of the middlware chain. It sets up initial context with all base services and passes it to the given handler. Return value of Base can be plugged in into httprouter directly.
type Handler ¶
type Handler func(context.Context, http.ResponseWriter, *http.Request, httprouter.Params)
Handler is the type for all request handlers. Of particular note, it's the same as httprouter.Handle, except that it also has a context parameter.
Click to show internal directories.
Click to hide internal directories.