Documentation
¶
Index ¶
Constants ¶
View Source
const ( HandlerExistsError = "A handler for the path already exists" HandlerDoesntExistError = "A handler for that path does not exist" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathTree ¶
type PathTree struct {
Root *RouteNode
}
func NewPathTree ¶
func NewPathTree() *PathTree
type RouteNode ¶
type RouteNode struct {
PathSegment string
Children map[string]*RouteNode
RequestHandlers map[string]common.HandlerFunc
}
func NewRouteNode ¶
func (*RouteNode) AddHandler ¶
func (n *RouteNode) AddHandler(method string, fn common.HandlerFunc) error
func (*RouteNode) GetHandler ¶
func (n *RouteNode) GetHandler(method string) (common.HandlerFunc, error)
Click to show internal directories.
Click to hide internal directories.