MCPcopy Create free account
hub / github.com/cloudfoundry/cli / ListAllRoutes

Method ListAllRoutes

cf/api/routes.go:53–61  ·  view source on GitHub ↗
(cb func(models.Route) bool)

Source from the content-addressed store, hash-verified

51}
52
53func (repo CloudControllerRouteRepository) ListAllRoutes(cb func(models.Route) bool) (apiErr error) {
54 return repo.gateway.ListPaginatedResources(
55 repo.config.APIEndpoint(),
56 fmt.Sprintf("/v2/routes?q=organization_guid:%s&inline-relations-depth=1", repo.config.OrganizationFields().GUID),
57 resources.RouteResource{},
58 func(resource interface{}) bool {
59 return cb(resource.(resources.RouteResource).ToModel())
60 })
61}
62
63func normalizedPath(path string) string {
64 if path != "" && !strings.HasPrefix(path, `/`) {

Callers

nothing calls this directly

Calls 4

APIEndpointMethod · 0.65
OrganizationFieldsMethod · 0.65
ToModelMethod · 0.45

Tested by

no test coverage detected