MCPcopy Index your code

hub / github.com/VividCortex/siesta / functions

Functions105 in github.com/VividCortex/siesta

↓ 43 callersMethodSet
(string, interface{})
context.go:12
↓ 22 callersMethodGet
(string)
context.go:13
↓ 12 callersMethodaddRoute
addRoute adds a node with the given handle to the path. Not concurrency-safe!
tree.go:97
↓ 9 callersFunctioncatchPanic
(testFunc func())
tree_test.go:215
↓ 7 callersMethodRoute
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 callersFunctionfakeHandler
(val string)
tree_test.go:50
↓ 6 callersFunctionNewService
NewService returns a new Service with the given base URI or panics if the base URI has already been registered.
service.go:45
↓ 6 callersMethodParse
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 callersFunctionToContextHandler
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 callersMethodfindCaseInsensitivePath
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 callersMethodgetValue
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 callersMethodInt
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 callersFunctiontestRoutes
(t *testing.T, routes []testRoute)
tree_test.go:229
↓ 3 callersMethodAddPre
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 callersMethodBool
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 callersMethodFloat64
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 callersMethodGet
(key string)
context.go:41
↓ 3 callersFunctionNewSiestaContext
()
context.go:33
↓ 3 callersFunctioncheckRequests
(t *testing.T, tree *node, requests testRequests)
tree_test.go:63
↓ 3 callersFunctioncountParams
(path string)
tree.go:41
↓ 2 callersMethodAddPost
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 callersFunctionCompose
Compose composes multiple ContextHandlers into a single ContextHandler.
handler.go:55
↓ 2 callersMethodServeHTTPInContext
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 callersMethodSet
(key string, value interface{})
context.go:37
↓ 2 callersMethodSetNotFound
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 callersMethodString
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 callersMethodUsage
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 callersFunctionaddToChain
(f interface{}, chain []ContextHandler)
service.go:69
↓ 2 callersFunctioncheckMaxParams
(t *testing.T, n *node)
tree_test.go:106
↓ 2 callersFunctioncheckPriorities
(t *testing.T, n *node)
tree_test.go:86
↓ 2 callersFunctioncompareUsageMaps
(t *testing.T, got, expected map[string][3]string)
params_test.go:74
↓ 2 callersMethodincrementChildPrio
increments priority of the given child and reorders if necessary
tree.go:76
↓ 2 callersMethodinsertChild
(numParams uint8, path string, usage string, handle ContextHandler)
tree.go:214
↓ 1 callersMethodDuration
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 callersMethodInt64
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 callersMethodIsBoolFlag
()
params.go:100
↓ 1 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
handler.go:13
↓ 1 callersMethodServeHTTP
Service satisfies the http.Handler interface.
service.go:87
↓ 1 callersMethodSliceBool
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 callersMethodSliceDuration
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 callersMethodSliceFloat64
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 callersMethodSliceInt
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 callersMethodSliceInt64
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 callersMethodSliceString
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 callersMethodSliceUint
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 callersMethodSliceUint64
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 callersMethodUint
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 callersMethodUint64
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 callersFunctionmin
(a, b int)
tree.go:34
↓ 1 callersMethodresource
resource returns the resource with id for user. An error is returned if the resource is not found.
examples/authentication/state.go:49
↓ 1 callersMethodvalidateToken
validateToken returns the user corresponding to the token. An error is returned if the token is not recognized.
examples/authentication/state.go:38
MethodDisableTrimSlash
DisableTrimSlash disables the removal of trailing slashes before route matching.
service.go:65
MethodGet
(key string)
context.go:22
MethodRegister
Register registers s by adding it as a handler to the DefaultServeMux in the net/http package.
service.go:219
MethodServeHTTPInContext
(c Context, w http.ResponseWriter, r *http.Request)
handler.go:17
MethodSet
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
MethodSet
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
MethodSet
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
MethodSet
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
MethodSet
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
MethodSet
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
MethodSet
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
MethodSet
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
MethodSet
(key string, value interface{})
context.go:19
MethodSetPostExecutionFunc
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
MethodString
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
MethodString
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
MethodString
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
MethodString
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
MethodString
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
MethodString
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
MethodString
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
MethodString
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
FunctionTestCompose
(t *testing.T)
handler_test.go:9
FunctionTestContext
(t *testing.T)
context_test.go:7
FunctionTestCountParams
(t *testing.T)
tree_test.go:128
FunctionTestEmptyContext
(t *testing.T)
context_test.go:20
FunctionTestEmptyWildcardName
(t *testing.T)
tree_test.go:320
FunctionTestParamsSimple
(t *testing.T)
params_test.go:9
FunctionTestParamsSlices
(t *testing.T)
params_test.go:107
FunctionTestServiceCustomNotFound
(t *testing.T)
service_test.go:42
FunctionTestServiceDefaultNotFound
(t *testing.T)
service_test.go:27
FunctionTestServiceRoute
(t *testing.T)
service_test.go:11
FunctionTestToContextHandlerUnsupportedHandler
(t *testing.T)
handler_test.go:47
FunctionTestTreeAddAndGet
(t *testing.T)
tree_test.go:137
FunctionTestTreeCatchAllConflict
(t *testing.T)
tree_test.go:339
FunctionTestTreeCatchAllConflictRoot
(t *testing.T)
tree_test.go:348
FunctionTestTreeChildConflict
(t *testing.T)
tree_test.go:268
FunctionTestTreeDoubleWildcard
(t *testing.T)
tree_test.go:356
FunctionTestTreeDupliatePath
(t *testing.T)
tree_test.go:284
FunctionTestTreeFindCaseInsensitivePath
(t *testing.T)
tree_test.go:452
FunctionTestTreeInvalidNodeType
(t *testing.T)
tree_test.go:583
FunctionTestTreeTrailingSlashRedirect
(t *testing.T)
tree_test.go:377
FunctionTestTreeWildcard
(t *testing.T)
tree_test.go:171
FunctionTestTreeWildcardConflict
(t *testing.T)
tree_test.go:247
Functionauthenticator
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
FunctioncompareSlices
(a, b []interface{})
params_test.go:95
FunctiongetResource
getResource is the function that handles the GET /resources/:resourceID route.
examples/authentication/resource.go:11
Functionmain
()
examples/authentication/main.go:10
Functionmain
()
examples/simple/main.go:12
next →1–100 of 105, ranked by callers