Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/beego/mux
/ functions
Functions
50 in github.com/beego/mux
⨍
Functions
50
◇
Types & classes
7
↓ 17 callers
Method
Get
Get registers a new GET route for a path with matching handler in the Mux.
mux.go:23
↓ 16 callers
Function
Request
(method, url string, body io.Reader)
mux_test.go:13
↓ 15 callers
Method
Handle
Handle registers a new handler with method and path in the Mux. For GET, POST, PUT, PATCH and DELETE requests the respective shortcut functions can be
mux.go:66
↓ 12 callers
Function
New
New returns a Mux instance.
mux.go:18
↓ 7 callers
Function
Params
Params return the router params
params.go:15
↓ 6 callers
Method
GetHandler
GetHandler ... GetHandler returns handler by method that defined on the node trie := New() trie.Parse("/api").Handle("GET", func handler1() {}) trie.
tree.go:443
↓ 6 callers
Method
getRootNode
getRootNode will return the Node whose parent is nil
tree.go:326
↓ 5 callers
Method
Parse
Parse will parse the pattern and returns the endpoint node for the pattern. trie := New() node1 := trie.Parse("/a") node2 := trie.Parse("/a/b") node3
tree.go:107
↓ 4 callers
Function
NewTrie
NewTrie returns a trie trie := New() disable CaseSensitive, PathClean and StrictSlash trie := New(Options{})
tree.go:71
↓ 3 callers
Method
Head
Head registers a new HEAD route for a path with matching handler in the Mux.
mux.go:28
↓ 3 callers
Method
Match
Match try to match path. It will returns a Matched instance that includes *Node, Params when matching success, otherwise a nil. matched, err := trie.
tree.go:127
↓ 3 callers
Method
Post
Post registers a new POST route for a path with matching handler in the Mux.
mux.go:33
↓ 3 callers
Function
benchRequests
(b *testing.B, router http.Handler, routes []route)
bench_test.go:364
↓ 3 callers
Function
benchRoutes
(b *testing.B, router http.Handler, routes []route)
bench_test.go:345
↓ 3 callers
Function
calcMem
(name string, load func())
bench_test.go:291
↓ 3 callers
Method
getChild
getChild return the static key
tree.go:279
↓ 3 callers
Function
matchNode
(parent *Node, segment, path string)
tree.go:471
↓ 3 callers
Function
regexpSegment
(seg string)
tree.go:554
↓ 2 callers
Method
GetAllow
GetAllow returns allow methods defined on the node trie := New() trie.Parse("/").Handle("GET", handler1) trie.Parse("/").Handle("PUT", handler2) tri
tree.go:455
↓ 2 callers
Method
Handler
Handler is an adapter which allows the usage of an http.Handler as a request handle.
mux.go:75
↓ 2 callers
Function
Param
Param return the router param based on the key
params.go:27
↓ 2 callers
Method
Put
Put registers a new PUT route for a path with matching handler in the Mux.
mux.go:38
↓ 2 callers
Method
ServeHTTP
ServeHTTP implemented http.Handler interface
mux.go:82
↓ 1 callers
Method
BuildURL
BuildURL will builds a URL for the pattern.
tree.go:334
↓ 1 callers
Method
DefaultHandler
DefaultHandler registers a new handler in the Mux that will run if there is no other handler matching.
mux.go:59
↓ 1 callers
Method
Delete
Delete registers a new DELETE route for a path with matching handler in the Mux.
mux.go:48
↓ 1 callers
Method
GetName
GetName returns the name for the route, if any.
tree.go:318
↓ 1 callers
Method
Name
Name sets the name for the route, used to build URLs.
tree.go:305
↓ 1 callers
Method
Options
Options registers a new OPTIONS route for a path with matching handler in the Mux.
mux.go:53
↓ 1 callers
Method
Patch
Patch registers a new PATCH route for a path with matching handler in the Mux.
mux.go:43
↓ 1 callers
Function
Request
(method, url string)
bench_test.go:356
↓ 1 callers
Function
buildPath
(segments []string, params map[string]string)
tree.go:356
↓ 1 callers
Method
getSegments
()
tree.go:270
↓ 1 callers
Function
mapToSlice
(m map[string]string)
tree_test.go:171
↓ 1 callers
Function
parsePattern
parsePattern support multi pattern
tree.go:460
↓ 1 callers
Function
parseSegment
segment support multi type ?:id :name :name(reg) :name:int :name:string *.* * cms_:id([0-9]+).html
tree.go:506
↓ 1 callers
Function
pathClean
(path string)
tree.go:658
Function
BenchmarkBeegoMux
(b *testing.B)
bench_test.go:383
Function
BenchmarkBeegoMuxRequests
(b *testing.B)
bench_test.go:395
Function
BenchmarkHttpRouter
(b *testing.B)
bench_test.go:387
Function
BenchmarkHttpRouterRequests
(b *testing.B)
bench_test.go:399
Function
BenchmarkHttpTreeMux
(b *testing.B)
bench_test.go:391
Function
BenchmarkHttpTreeMuxRequests
(b *testing.B)
bench_test.go:403
Method
Handle
Handle is used to mount a handler with a method name to the node. t := New() node := t.Define("/a/b") node.Handle("GET", handler1) node.Handle("POST"
tree.go:425
Function
TestBuildURL
(t *testing.T)
tree_test.go:127
Function
TestMux
(t *testing.T)
mux_test.go:21
Function
TestRegexpSegment
(t *testing.T)
tree_test.go:8
Function
TestRouters
(t *testing.T)
tree_test.go:96
Function
TestUnmatched
(t *testing.T)
tree_test.go:148
Function
init
()
bench_test.go:308