(cb func(models.Route) bool)
| 51 | } |
| 52 | |
| 53 | func (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 | |
| 63 | func normalizedPath(path string) string { |
| 64 | if path != "" && !strings.HasPrefix(path, `/`) { |
nothing calls this directly
no test coverage detected