Documentation ¶
Overview ¶
koala is a simple multiplexer for go
Index ¶
- func Param(request *http.Request, key string) string
- func Params(request *http.Request) map[string]string
- type Mux
- func (mux *Mux) AddRoute(method string, path string, handlerFunc http.HandlerFunc) *Mux
- func (mux *Mux) AddRouteHandler(method string, path string, handler http.Handler) *Mux
- func (mux *Mux) Delete(path string, handlerFunc http.HandlerFunc) *Mux
- func (mux *Mux) DeleteHandler(path string, handler http.Handler) *Mux
- func (mux *Mux) Get(path string, handlerFunc http.HandlerFunc) *Mux
- func (mux *Mux) GetHandler(path string, handler http.Handler) *Mux
- func (mux *Mux) Post(path string, handlerFunc http.HandlerFunc) *Mux
- func (mux *Mux) PostHandler(path string, handler http.Handler) *Mux
- func (mux *Mux) Put(path string, handlerFunc http.HandlerFunc) *Mux
- func (mux *Mux) PutHandler(path string, handler http.Handler) *Mux
- func (mux *Mux) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mux ¶
type Mux struct { NotFoundHandler http.Handler // Handler when no routes are matched. Defaults to `http.NotFoundHandler` // contains filtered or unexported fields }
func (*Mux) AddRouteHandler ¶
func (*Mux) Delete ¶
func (mux *Mux) Delete(path string, handlerFunc http.HandlerFunc) *Mux
Short hand for AddRoute("DELETE", path, handlerFunc)
func (*Mux) DeleteHandler ¶
Short hand for AddRouteHandler("DELETE", path, handler)
func (*Mux) Get ¶
func (mux *Mux) Get(path string, handlerFunc http.HandlerFunc) *Mux
Short hand for AddRoute("GET", path, handlerFunc)
func (*Mux) GetHandler ¶
Short hand for AddRouteHandler("GET", path, handler)
func (*Mux) Post ¶
func (mux *Mux) Post(path string, handlerFunc http.HandlerFunc) *Mux
Short hand for AddRoute("POST", path, handlerFunc)
func (*Mux) PostHandler ¶
Short hand for AddRouteHandler("POST", path, handler)
func (*Mux) Put ¶
func (mux *Mux) Put(path string, handlerFunc http.HandlerFunc) *Mux
Short hand for AddRoute("PUT", path, handlerFunc)
func (*Mux) PutHandler ¶
Short hand for AddRouteHandler("PUT", path, handler)
Click to show internal directories.
Click to hide internal directories.