Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/VividCortex/siesta
/ functions
Functions
105 in github.com/VividCortex/siesta
⨍
Functions
105
◇
Types & classes
24
↓ 43 callers
Method
Set
(string, interface{})
context.go:12
↓ 22 callers
Method
Get
(string)
context.go:13
↓ 12 callers
Method
addRoute
addRoute adds a node with the given handle to the path. Not concurrency-safe!
tree.go:97
↓ 9 callers
Function
catchPanic
(testFunc func())
tree_test.go:215
↓ 7 callers
Method
Route
Route adds a new route to the Service. f must be a function with one of the following signatures: func(http.ResponseWriter, *http.Request) func(http.
service.go:192
↓ 7 callers
Function
fakeHandler
(val string)
tree_test.go:50
↓ 6 callers
Function
NewService
NewService returns a new Service with the given base URI or panics if the base URI has already been registered.
service.go:45
↓ 6 callers
Method
Parse
Parse parses URL parameters from a http.Request.URL.Query(), which is a url.Values, which is just a map[string][string].
params.go:25
↓ 6 callers
Function
ToContextHandler
ToContextHandler transforms f into a ContextHandler. f must be a function with one of the following signatures: func(http.ResponseWriter, *http.Reques
handler.go:27
↓ 5 callers
Method
findCaseInsensitivePath
Makes a case-insensitive lookup of the given path and tries to find a handler. It can optionally also fix trailing slashes. It returns the case-correc
tree.go:455
↓ 5 callers
Method
getValue
Returns the handle registered with the given path (key). The values of wildcards are saved to a map. If no handle can be found, a TSR (trailing slash
tree.go:332
↓ 4 callers
Method
Int
Int defines an int param with specified name and default value. The return value is the address of an int variable that stores the value of the param.
params.go:152
↓ 4 callers
Function
testRoutes
(t *testing.T, routes []testRoute)
tree_test.go:229
↓ 3 callers
Method
AddPre
AddPre adds f to the end of the "pre" chain. It panics if f cannot be converted to a ContextHandler (see Service.Route).
service.go:76
↓ 3 callers
Method
Bool
Bool defines a bool param with specified name and default value. The return value is the address of a bool variable that stores the value of the param
params.go:105
↓ 3 callers
Method
Float64
Float64 defines a float64 param with specified name and default value. The return value is the address of a float64 variable that stores the value of
params.go:381
↓ 3 callers
Method
Get
(key string)
context.go:41
↓ 3 callers
Function
NewSiestaContext
()
context.go:33
↓ 3 callers
Function
checkRequests
(t *testing.T, tree *node, requests testRequests)
tree_test.go:63
↓ 3 callers
Function
countParams
(path string)
tree.go:41
↓ 2 callers
Method
AddPost
AddPost adds f to the end of the "post" chain. It panics if f cannot be converted to a ContextHandler (see Service.Route).
service.go:82
↓ 2 callers
Function
Compose
Compose composes multiple ContextHandlers into a single ContextHandler.
handler.go:55
↓ 2 callers
Method
ServeHTTPInContext
ServeHTTPInContext serves an HTTP request within the Context c. A Service will run through both of its internal chains, quitting when requested.
service.go:94
↓ 2 callers
Method
Set
(key string, value interface{})
context.go:37
↓ 2 callers
Method
SetNotFound
SetNotFound sets the handler for all paths that do not match any existing routes. It accepts the same function signatures that Route does with the add
service.go:207
↓ 2 callers
Method
String
String defines a string param with specified name and default value. The return value is the address of a string variable that stores the value of the
params.go:340
↓ 2 callers
Method
Usage
Usage returns a map keyed on parameter names. The map values are an array of name, type, and usage information for each parameter.
params.go:68
↓ 2 callers
Function
addToChain
(f interface{}, chain []ContextHandler)
service.go:69
↓ 2 callers
Function
checkMaxParams
(t *testing.T, n *node)
tree_test.go:106
↓ 2 callers
Function
checkPriorities
(t *testing.T, n *node)
tree_test.go:86
↓ 2 callers
Function
compareUsageMaps
(t *testing.T, got, expected map[string][3]string)
params_test.go:74
↓ 2 callers
Method
incrementChildPrio
increments priority of the given child and reorders if necessary
tree.go:76
↓ 2 callers
Method
insertChild
(numParams uint8, path string, usage string, handle ContextHandler)
tree.go:214
↓ 1 callers
Method
Duration
Duration defines a time.Duration param with specified name and default value. The return value is the address of a time.Duration variable that stores
params.go:428
↓ 1 callers
Method
Int64
Int64 defines an int64 param with specified name and default value. The return value is the address of an int64 variable that stores the value of the
params.go:199
↓ 1 callers
Method
IsBoolFlag
()
params.go:100
↓ 1 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
handler.go:13
↓ 1 callers
Method
ServeHTTP
Service satisfies the http.Handler interface.
service.go:87
↓ 1 callers
Method
SliceBool
SliceBool defines a multi-value bool param with specified name and default value. The return value is the address of a SBool variable that stores the
params.go:141
↓ 1 callers
Method
SliceDuration
SliceDuration defines a multi-value time.Duration param with specified name and default value. The return value is the address of a SDuration variable
params.go:464
↓ 1 callers
Method
SliceFloat64
SliceFloat64 defines a multi-value float64 param with specified name and default value. The return value is the address of a SFloat64 variable that st
params.go:417
↓ 1 callers
Method
SliceInt
SliceInt defines a multi-value int param with specified name and default value. The return value is the address of a SInt variable that stores the val
params.go:188
↓ 1 callers
Method
SliceInt64
SliceInt64 defines a multi-value int64 param with specified name and default value. The return value is the address of a SInt64 variable that stores t
params.go:235
↓ 1 callers
Method
SliceString
SliceString defines a multi-value string param with specified name and default value. The return value is the address of a SString variable that store
params.go:370
↓ 1 callers
Method
SliceUint
SliceUint defines a multi-value uint param with specified name and default value. The return value is the address of a SUint variable that stores the
params.go:282
↓ 1 callers
Method
SliceUint64
SliceUint64 defines a multi-value uint64 param with specified name and default value. The return value is the address of a SUint64 variable that store
params.go:329
↓ 1 callers
Method
Uint
Uint defines a uint param with specified name and default value. The return value is the address of a uint variable that stores the value of the param
params.go:246
↓ 1 callers
Method
Uint64
Uint64 defines a uint64 param with specified name and default value. The return value is the address of a uint64 variable that stores the value of the
params.go:293
↓ 1 callers
Function
min
(a, b int)
tree.go:34
↓ 1 callers
Method
resource
resource returns the resource with id for user. An error is returned if the resource is not found.
examples/authentication/state.go:49
↓ 1 callers
Method
validateToken
validateToken returns the user corresponding to the token. An error is returned if the token is not recognized.
examples/authentication/state.go:38
Method
DisableTrimSlash
DisableTrimSlash disables the removal of trailing slashes before route matching.
service.go:65
Method
Get
(key string)
context.go:22
Method
Register
Register registers s by adding it as a handler to the DefaultServeMux in the net/http package.
service.go:219
Method
ServeHTTPInContext
(c Context, w http.ResponseWriter, r *http.Request)
handler.go:17
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:126
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:173
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:220
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:267
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:314
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:361
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:402
Method
Set
Set is the method to set the param value, part of the flag.Value interface. Set's argument is a string to be parsed to set the param. It's a comma-sep
params.go:449
Method
Set
(key string, value interface{})
context.go:19
Method
SetPostExecutionFunc
SetPostExecutionFunc sets a function that is executed at the end of every request. panicValue will be non-nil if a value was recovered after a panic.
service.go:59
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:119
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:166
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:213
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:260
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:307
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:354
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:395
Method
String
String is the method to format the param's value, part of the flag.Value interface. The String method's output will be used in diagnostics.
params.go:442
Function
TestCompose
(t *testing.T)
handler_test.go:9
Function
TestContext
(t *testing.T)
context_test.go:7
Function
TestCountParams
(t *testing.T)
tree_test.go:128
Function
TestEmptyContext
(t *testing.T)
context_test.go:20
Function
TestEmptyWildcardName
(t *testing.T)
tree_test.go:320
Function
TestParamsSimple
(t *testing.T)
params_test.go:9
Function
TestParamsSlices
(t *testing.T)
params_test.go:107
Function
TestServiceCustomNotFound
(t *testing.T)
service_test.go:42
Function
TestServiceDefaultNotFound
(t *testing.T)
service_test.go:27
Function
TestServiceRoute
(t *testing.T)
service_test.go:11
Function
TestToContextHandlerUnsupportedHandler
(t *testing.T)
handler_test.go:47
Function
TestTreeAddAndGet
(t *testing.T)
tree_test.go:137
Function
TestTreeCatchAllConflict
(t *testing.T)
tree_test.go:339
Function
TestTreeCatchAllConflictRoot
(t *testing.T)
tree_test.go:348
Function
TestTreeChildConflict
(t *testing.T)
tree_test.go:268
Function
TestTreeDoubleWildcard
(t *testing.T)
tree_test.go:356
Function
TestTreeDupliatePath
(t *testing.T)
tree_test.go:284
Function
TestTreeFindCaseInsensitivePath
(t *testing.T)
tree_test.go:452
Function
TestTreeInvalidNodeType
(t *testing.T)
tree_test.go:583
Function
TestTreeTrailingSlashRedirect
(t *testing.T)
tree_test.go:377
Function
TestTreeWildcard
(t *testing.T)
tree_test.go:171
Function
TestTreeWildcardConflict
(t *testing.T)
tree_test.go:247
Function
authenticator
authenticator reads the username from the HTTP basic authentication header and validates the token. It sets the "user" key in the context to the user
examples/authentication/middleware.go:30
Function
compareSlices
(a, b []interface{})
params_test.go:95
Function
getResource
getResource is the function that handles the GET /resources/:resourceID route.
examples/authentication/resource.go:11
Function
main
()
examples/authentication/main.go:10
Function
main
()
examples/simple/main.go:12
next →
1–100 of 105, ranked by callers