web

package module
v0.0.0-...-fd27991 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

README

web

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.

func GojiParam

func GojiParam(ctx context.Context, key string) string

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

type ContextHandlerFunc func(c context.Context, w http.ResponseWriter, req *http.Request)

ContextHandlerFunc implements ServeHTTP for a function

func (ContextHandlerFunc) ServeHTTP

ServeHTTP implements the http.Handler interface for a function, calling itself

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL