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

Method ListSpaces

cf/api/spaces/spaces.go:40–48  ·  view source on GitHub ↗
(callback func(models.Space) bool)

Source from the content-addressed store, hash-verified

38}
39
40func (repo CloudControllerSpaceRepository) ListSpaces(callback func(models.Space) bool) error {
41 return repo.gateway.ListPaginatedResources(
42 repo.config.APIEndpoint(),
43 fmt.Sprintf("/v2/organizations/%s/spaces?order-by=name&inline-relations-depth=1", repo.config.OrganizationFields().GUID),
44 resources.SpaceResource{},
45 func(resource interface{}) bool {
46 return callback(resource.(resources.SpaceResource).ToModel())
47 })
48}
49
50func (repo CloudControllerSpaceRepository) ListSpacesFromOrg(orgGUID string, callback func(models.Space) bool) error {
51 return repo.gateway.ListPaginatedResources(

Callers

nothing calls this directly

Calls 5

callbackFuncType · 0.85
APIEndpointMethod · 0.65
OrganizationFieldsMethod · 0.65
ToModelMethod · 0.45

Tested by

no test coverage detected