router

package
v0.0.0-...-f6b08e7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 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 RouteHandler

type RouteHandler func(w http.ResponseWriter, r *http.Request, params map[string]string)

type RouteHandlers

type RouteHandlers map[string]interface{}

type Router

type Router struct {
	Tree *tree.TreeNode
}

func NewRouter

func NewRouter() *Router

func (*Router) Add

func (r *Router) Add(method string, path string, handler tree.Handler)

func (*Router) Delete

func (r *Router) Delete(path string, handler tree.Handler)

func (*Router) Get

func (r *Router) Get(path string, handler tree.Handler)

func (*Router) GetHandler

func (r *Router) GetHandler(path, method string) (tree.Handler, map[string]string)

func (*Router) Post

func (r *Router) Post(path string, handler tree.Handler)

func (*Router) Put

func (r *Router) Put(path string, handler tree.Handler)

Jump to

Keyboard shortcuts

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