MCPcopy Create free account
hub / github.com/cloudwan/gohan / MapNamespacesRoutes

Function MapNamespacesRoutes

server/api.go:464–474  ·  view source on GitHub ↗

MapNamespacesRoutes maps routes for all namespaces

(route martini.Router)

Source from the content-addressed store, hash-verified

462
463// MapNamespacesRoutes maps routes for all namespaces
464func MapNamespacesRoutes(route martini.Router) {
465 manager := schema.GetManager()
466
467 for _, namespace := range manager.Namespaces() {
468 if namespace.IsTopLevel() {
469 mapTopLevelNamespaceRoute(route, namespace)
470 } else {
471 mapChildNamespaceRoute(route, namespace)
472 }
473 }
474}
475
476// mapTopLevelNamespaceRoute maps route listing available subnamespaces (versions)
477// for a top-level namespace

Callers 1

mapRoutesMethod · 0.85

Calls 4

mapChildNamespaceRouteFunction · 0.85
NamespacesMethod · 0.80
IsTopLevelMethod · 0.80

Tested by

no test coverage detected