Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextHandlerAdapter ¶
func ContextHandlerAdapter(ctx context.Context, ch ContextHandler) http.Handler
ContextHandlerAdapter wraps a ContextHandler, returning an http.Handler that initializes a context allowing ContexHandler to be mounted on any net/http compatible library.
func GojiContextHandlerAdapter ¶
func GojiContextHandlerAdapter(ctx context.Context, ch ContextHandler) web.Handler
ContextHandlerAdapter wraps a ContextHandler, returning an http.Handler that initializes a context allowing ContexHandler to be mounted on any net/http compatible library.
Types ¶
type ContextHandler ¶
type ContextHandler interface {
ServeHTTP(c context.Context, w http.ResponseWriter, req *http.Request)
}
ContextHandler is a extension of a http.Handler that also includes a context.Context object.
type ContextHandlerFunc ¶
ContextHandlerFunc implements ServeHTTP for a function
func (ContextHandlerFunc) ServeHTTP ¶
func (ch ContextHandlerFunc) ServeHTTP(c context.Context, w http.ResponseWriter, req *http.Request)
ServeHTTP implements the http.Handler interface for a function, calling itself
Click to show internal directories.
Click to hide internal directories.