gorilla

package
v0.0.0-...-acf47f6 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CastError

type CastError int

func (CastError) Error

func (CastError) Error() string

implements the error interface.

type Router

type Router struct {
	*mux.Router
}

Router is a type alias for *github.com/gorilla/mux.Router to make reference easier, as well as to implement the Mux interface.

func NewRouter

func NewRouter(router *mux.Router) *Router

NewRouter returns a new Router, wrapping the given gorilla mux Router.

func (*Router) Handle

func (r *Router) Handle(pattern string, handler http.Handler)

Handle registers the handler for the given pattern. According to net/http.ServeMux If a handler already exists for pattern, the Handle invocation panics.

func (*Router) HandleFunc

func (r *Router) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

HandleFunc registers the handler function for the given pattern.

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServerHTTP implements net/http.Handler

Jump to

Keyboard shortcuts

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