Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMiddleware ¶
func ApplyMiddleware(h http.HandlerFunc, middleware ...Middleware) http.HandlerFunc
ApplyMiddleware will apply all middleware, the last arguments will be the outer wrap for context passing purposes
Types ¶
type ContextID ¶
type ContextID int
ContextID is our type to retrieve our context objects
const ID ContextID = 0
ID is the only ID we've defined
type Middleware ¶
type Middleware func(http.HandlerFunc) http.HandlerFunc
Middleware is what all middleware functions will return
func Logger ¶
func Logger(l *log.Logger) Middleware
Logger logs requests, this will use an id passed in via SetID()
func SetID ¶
func SetID(start int64) Middleware
SetID updates context with the id then increments it
Click to show internal directories.
Click to hide internal directories.