Versions in this module Expand all Collapse all v0 v0.1.0 Jul 16, 2016 Changes in this version + const HTTPMethodDELETE + const HTTPMethodGET + const HTTPMethodPOST + const HTTPMethodPUT + const RootPath + const RouteInfoKeyDescription + const RouteInfoKeyIsRoot + func Log(v ...interface{}) + type CacheEntry struct + Params map[string]interface{} + Route *Route + func NotFoundCacheEntry() CacheEntry + type Chain struct + Handlers []http.Handler + func NewChain() Chain + func (ch *Chain) Add(v ...http.Handler) *Chain + func (ch *Chain) AddFunc(v ...http.HandlerFunc) *Chain + func (ch *Chain) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (ch *Chain) Then(handler http.Handler) *Chain + func (ch *Chain) ThenFunc(handlerFunc http.HandlerFunc) *Chain + type DebugLevel int + const DebugLevelFull + const DebugLevelNone + const DebugLevelTimings + type DomainMap struct + NotFoundHandler http.Handler + func NewDomainMap() *DomainMap + func (domainMap *DomainMap) AddRouter(subdomain string, router *Router) + func (domainMap *DomainMap) InvalidateMatchedHosts() + func (domainMap *DomainMap) NewRouter(subdomain string) *Router + func (domainMap *DomainMap) ServeHTTP(w http.ResponseWriter, req *http.Request) + type Filter interface + ExecuteFilter func(req **http.Request) + type Match struct + CatchAllValue string + Node *Node + Params map[string][]string + ParentMatch *Match + func NewMatch(node *Node) *Match + func NewMatchWithParent(node *Node, parentMatch *Match) *Match + func (match *Match) String() string + type MatchCandidate struct + func NewMatchCandidate(path string) MatchCandidate + func NoMatchCandidate() MatchCandidate + func (mc MatchCandidate) HasRemainingCandidates() bool + func (mc MatchCandidate) IsNoMatch() bool + func (mc MatchCandidate) NextCandidate() MatchCandidate + type Matcher struct + LogMatchTime bool + func NewMatcher(router *Router) *Matcher + func (m *Matcher) MatchPathToRoute(method string, path string, req *http.Request) *Match + type Node struct + func (node *Node) HasChildren() bool + func (node *Node) RouteForMethod(method string) *Route + func (node *Node) String() string + type Route struct + Handler http.Handler + Info map[string]interface{} + Meta map[string]interface{} + Method string + Path string + PathFormat string + func NewRoute(method string, path string) *Route + func NewRouteWithMeta(method string, path string, meta map[string]interface{}) *Route + func (rte *Route) Describe(description string) *Route + func (rte *Route) Handle(handler http.Handler) *Route + func (rte *Route) HandleFunc(handlerFunc http.HandlerFunc) *Route + func (rte *Route) IsRoot() bool + type RouteCache struct + Entries []CacheEntry + MaxEntries int + ReorderOnAccess bool + func NewRouteCache() *RouteCache + func (rc *RouteCache) Clear() + func (rc *RouteCache) Get(path string) CacheEntry + func (rc *RouteCache) Put(path string, entry CacheEntry) + func (rc *RouteCache) PutRoute(path string, route *Route) + type RouteComponentType int + const ComponentTypeCatchAll + const ComponentTypeFixed + const ComponentTypeWildcard + type Router struct + BeforeChain Chain + ErrorHandler http.Handler + ShouldCacheMatchedRoutes bool + func NewRouter() *Router + func (r *Router) Add(method string, path string) *Route + func (r *Router) AddFilter(filter Filter) + func (r *Router) AddStatic(staticRoot string) + func (r *Router) AddStaticWithPrefix(staticRoot string, prefix string) + func (r *Router) NewMatcher() *Matcher + func (r *Router) PrintRoutes() + func (r *Router) PrintTreeInfo() + func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (r *Router) SetDebugLevel(debugLevel DebugLevel) + func (r *Router) SetErrorHandler(statusCode int, handler http.Handler) + func (r *Router) SetErrorHandlerFunc(statusCode int, handler http.HandlerFunc) + func (r *Router) SetGlobalHandler(method string, handler http.Handler) + func (r *Router) SetGlobalHandlerFunc(method string, handlerFunc http.HandlerFunc) + func (r *Router) SetStringVariable(variable string, value string) + func (r *Router) Use(route *Route) *Route + type StaticLocation struct + type Tree struct + func NewTree() *Tree + func (t *Tree) AddRouteToTree(route *Route, variables map[string]string) + func (t *Tree) NewNode(part string, parent *Node) *Node