Router

package
v0.0.0-...-2776abb Latest Latest
Warning

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

Go to latest
Published: May 6, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PatternToRegex

func PatternToRegex(pattern string) *regexp.Regexp

Types

type HandlerFunc

type HandlerFunc func(*http.Session)

func (HandlerFunc) ServeHTTP

func (f HandlerFunc) ServeHTTP(session *http.Session)

type Route

type Route struct {
	Route   *route.Route
	Handler HandlerFunc
}

type Router

type Router struct {
	Config *Config.Config
	Routes []*Route
}

func Create

func Create(config *Config.Config) *Router

func (*Router) Delete

func (h *Router) Delete(pattern string, handler HandlerFunc) *Router

func (*Router) Get

func (h *Router) Get(pattern string, handler HandlerFunc) *Router

func (*Router) HandleFunc

func (h *Router) HandleFunc(methods []string, path string, handler func(*http.Session)) *Router

func (*Router) Handler

func (h *Router) Handler(methods []string, path string, handler HandlerFunc) *Router

func (*Router) Options

func (h *Router) Options(pattern string, handler HandlerFunc) *Router

func (*Router) Patch

func (h *Router) Patch(pattern string, handler HandlerFunc) *Router

func (*Router) Post

func (h *Router) Post(pattern string, handler HandlerFunc) *Router

func (*Router) Put

func (h *Router) Put(pattern string, handler HandlerFunc) *Router

func (*Router) Serve

func (h *Router) Serve(session *http.Session)

func (*Router) ServeHTTP

func (h *Router) ServeHTTP(w nethttp.ResponseWriter, r *nethttp.Request)

func (*Router) Static

func (h *Router) Static(filename string) HandlerFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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