MCPcopy Index your code
hub / github.com/cloudfoundry/cli / NewRouter

Function NewRouter

api/uaa/internal/routing.go:117–126  ·  view source on GitHub ↗

NewRouter returns a pointer to a new Router.

(routes []Route, resources map[string]string)

Source from the content-addressed store, hash-verified

115
116// NewRouter returns a pointer to a new Router.
117func NewRouter(routes []Route, resources map[string]string) *Router {
118 mappedRoutes := map[string]Route{}
119 for _, route := range routes {
120 mappedRoutes[route.Name] = route
121 }
122 return &Router{
123 routes: mappedRoutes,
124 resources: resources,
125 }
126}
127
128// CreateRequest returns a request key'd off of the name given. The params are
129// merged into the URL and body is set as the request body.

Callers 2

SetupResourcesMethod · 0.92
routing_test.goFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected