Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/donutloop/mux
/ functions
Functions
168 in github.com/donutloop/mux
⨍
Functions
168
◇
Types & classes
26
↓ 15 callers
Method
HandlerFunc
(handler func(http.ResponseWriter, *http.Request))
route.go:29
↓ 14 callers
Method
Error
()
errors.go:39
↓ 12 callers
Method
HandleFunc
HandleFunc registers a new route with a matcher for the URL path. See Route.Path() and Route.HandlerFunc().
router.go:181
↓ 12 callers
Method
Match
(*http.Request)
matcher.go:17
↓ 10 callers
Method
NewRoute
NewRoute registers an empty route.
router.go:147
↓ 10 callers
Method
RegisterRoute
RegisterRoute registers and validates a new route
router.go:152
↓ 9 callers
Method
Rank
()
matcher.go:18
↓ 9 callers
Function
newPathWithVarsMatcher
(path string)
matcher.go:114
↓ 8 callers
Method
Path
(string)
route.go:28
↓ 6 callers
Function
Classic
Classic returns a new classic router instance.
classic.go:4
↓ 6 callers
Method
Handle
Handle registers a new route with a matcher for the URL path. See Route.Path() and Route.Handler().
router.go:173
↓ 5 callers
Method
Kind
()
route.go:31
↓ 5 callers
Function
NewBadRouteError
(r RouteInterface, s string)
errors.go:11
↓ 5 callers
Method
addMatcher
addMatcher adds a matcher to the route.
route.go:157
↓ 5 callers
Function
newSchemeMatcher
(schemes ...string)
matcher.go:76
↓ 4 callers
Method
Error
()
errors.go:18
↓ 4 callers
Method
Get
Get return the key value, of the current *http.Request queries
route.go:240
↓ 4 callers
Function
NewBadPathError
NewBadPathError returns an error that formats as the given text.
errors.go:42
↓ 4 callers
Method
Validate
(RouteInterface)
validator.go:7
↓ 4 callers
Function
matchMap
matchMapWithString returns true if the given key/value pairs exist in a given map.
helper.go:102
↓ 4 callers
Function
newHeaderMatcher
(pairs ...string)
matcher.go:24
↓ 4 callers
Function
newHeaderRegexMatcher
(pairs ...string)
matcher.go:44
↓ 4 callers
Function
newMethodValidator
newMethodValidator returns default method validator
validator.go:14
↓ 3 callers
Method
GetMethodName
()
route.go:25
↓ 3 callers
Method
GetPath
()
route.go:27
↓ 3 callers
Method
Handler
(http.Handler)
route.go:23
↓ 3 callers
Method
ServeHTTP
ServeHTTP dispatches the handler registered in the matched route. When there is a match, the route variables can be retrieved calling mux.GetVars(req
router.go:78
↓ 3 callers
Method
SortRoutes
SortRoutes sorts the routes (Rank: RegexPath, PathWithVars, PathNormal)
router.go:258
↓ 3 callers
Method
compare
(string)
helper.go:75
↓ 3 callers
Function
contextGet
(r *http.Request, key interface{})
context.go:64
↓ 3 callers
Function
contextSet
(r *http.Request, key, val interface{})
context.go:68
↓ 3 callers
Function
convertStringsToMapString
convertStringsToMap converts variadic string parameters to a string to string map.
helper.go:22
↓ 3 callers
Function
genericConvertStringsToMap
genericConvertStringsToMap converts variadic string paramers to a string to whatever.
helper.go:51
↓ 3 callers
Function
newPathRegexMatcher
(path string)
matcher.go:149
↓ 2 callers
Function
CurrentRoute
CurrentRoute returns the matched route for the current request. This only works when called inside the handler of the matched route because the matche
context.go:30
↓ 2 callers
Method
Error
()
errors.go:27
↓ 2 callers
Method
GetAll
GetAll returns all queries of the current *http.Request queries
route.go:248
↓ 2 callers
Method
GetMatchers
()
route.go:30
↓ 2 callers
Function
GetQueries
GetQueries returns the query variables for the current request.
context.go:19
↓ 2 callers
Function
GetVars
GetVars returns the route variables for the current request, if any.
context.go:53
↓ 2 callers
Method
HasErrors
HasErrors checks if any errors exists
router.go:241
↓ 2 callers
Function
NewBadMethodError
NewBadMethodError returns an error that formats as the given text.
errors.go:30
↓ 2 callers
Method
Path
Path adds a matcher for the URL path. It accepts a path with zero variables. The template must start with a "/". For example: r := mux.Classic() r.Pa
route.go:174
↓ 2 callers
Method
SetError
(error)
route.go:19
↓ 2 callers
Function
convertStringsToMapRegex
mapFromPairsToRegex converts variadic string paramers to a string to regex map.
helper.go:33
↓ 2 callers
Function
extractQueries
(req *http.Request)
context.go:96
↓ 2 callers
Method
extractVarsIndexies
(prefix string, path string, name string)
route.go:206
↓ 2 callers
Method
notFoundHandler
()
router.go:118
↓ 1 callers
Function
AddCurrentRoute
(r *http.Request, val interface{})
context.go:48
↓ 1 callers
Function
AddQueries
(r *http.Request)
context.go:37
↓ 1 callers
Function
AddVars
(r *http.Request, val interface{})
context.go:60
↓ 1 callers
Method
Count
Count returns count of the current *http.Request queries
context.go:92
↓ 1 callers
Method
Delete
Delete registers a new delete route for the URL path See Route.Path() and Route.HandlerFunc()
router.go:205
↓ 1 callers
Method
ExtractVars
(req *http.Request)
route.go:26
↓ 1 callers
Method
GetError
()
route.go:20
↓ 1 callers
Method
GetError
GetError returns an error resulted from building the route
route.go:106
↓ 1 callers
Method
GetHandler
()
route.go:22
↓ 1 callers
Method
Handler
Handler sets a handler for the route.
route.go:94
↓ 1 callers
Method
HasError
()
route.go:18
↓ 1 callers
Method
HasHandler
()
route.go:21
↓ 1 callers
Method
HasVars
()
route.go:17
↓ 1 callers
Method
Head
Head registers a new head route for the URL path See Route.Path() and Route.HandlerFunc()
router.go:217
↓ 1 callers
Method
ListenAndServe
ListenAndServe listens on the TCP network address addr and then calls Serve with handler to handle requests on incoming connections.
router.go:224
↓ 1 callers
Method
Match
(req *http.Request)
route.go:32
↓ 1 callers
Function
NewRouter
NewRouter returns a new router instance.
router.go:11
↓ 1 callers
Method
Options
Options registers a new options route for the URL path See Route.Path() and Route.HandlerFunc()
router.go:211
↓ 1 callers
Method
Post
Post registers a new post route for the URL path See Route.Path() and Route.HandlerFunc()
router.go:199
↓ 1 callers
Method
Put
Put registers a new put route for the URL path See Route.Path() and Route.HandlerFunc()
router.go:193
↓ 1 callers
Method
SetMethodName
(string)
route.go:24
↓ 1 callers
Method
UseRoute
UseRoute that you can use diffrent instances routes
router.go:53
↓ 1 callers
Function
cleanPath
cleanPath returns the canonical path for p, eliminating . and .. elements. Borrowed from the net/http package. net/http/server.go
router.go:129
↓ 1 callers
Function
containsRegex
containsRegexPath returns true if the path a regex path
helper.go:135
↓ 1 callers
Function
containsVars
containsRegexPath returns true if the path contains vars
helper.go:140
↓ 1 callers
Function
createRandomStringsCount
()
helper_test.go:10
↓ 1 callers
Function
isEvenPairs
the count is not an even number.
helper.go:12
↓ 1 callers
Method
isNotEmpty
()
helper.go:76
↓ 1 callers
Function
newPathValidator
()
validator.go:42
↓ 1 callers
Function
populateHeaderWithTestData
(request *http.Request)
matcher_test.go:362
↓ 1 callers
Function
testRoute
(rt routeTest)
router_test.go:282
↓ 1 callers
Method
triggerMatching
triggerMatching matches registered routes against the request.
router.go:58
Function
BenchmarkExtractQueries
(b *testing.B)
context_test.go:30
Function
BenchmarkHeaderMatchers
(b *testing.B)
matcher_test.go:308
Function
BenchmarkMatchMap
(b *testing.B)
helper_test.go:106
Function
BenchmarkMethodValidaor
(b *testing.B)
validator_test.go:35
Function
BenchmarkNewPathWithVarsMatcher
(b *testing.B)
matcher_test.go:399
Function
BenchmarkPathMatchers
(b *testing.B)
matcher_test.go:167
Function
BenchmarkSchemeMatcher
(b *testing.B)
matcher_test.go:49
Method
ExtractVars
ExtractVars extract all vars of the current path
route.go:253
Method
Get
Get registers a new get route for the URL path See Route.Path() and Route.HandlerFunc()
router.go:187
Method
Get
Get return the key value, of the current *http.Request queries
context.go:79
Method
GetAll
Get returns all queries of the current *http.Request queries
context.go:87
Method
GetHandler
GetHandler returns the handler for the route, if any.
route.go:89
Method
GetMatchers
GetMatchers get the Matchers for the route
route.go:126
Method
GetMethodName
GetMethodName get the method name for the route
route.go:121
Method
GetName
GetName returns the name for the route.
route.go:152
Method
GetPath
GetPath returns the handler for the route.
route.go:202
Method
HandlerFunc
HandlerFunc sets a handler function for the route.
route.go:131
Method
HasError
HasError check if an error exists.
route.go:101
Method
HasHandler
HasHandler returns ture if route has a handler.
route.go:84
Method
HasVars
HasVars check if path has any vars
route.go:233
next →
1–100 of 168, ranked by callers