(orgGUID string, callback func(models.Space) bool)
| 48 | } |
| 49 | |
| 50 | func (repo CloudControllerSpaceRepository) ListSpacesFromOrg(orgGUID string, callback func(models.Space) bool) error { |
| 51 | return repo.gateway.ListPaginatedResources( |
| 52 | repo.config.APIEndpoint(), |
| 53 | fmt.Sprintf("/v2/organizations/%s/spaces?order-by=name&inline-relations-depth=1", orgGUID), |
| 54 | resources.SpaceResource{}, |
| 55 | func(resource interface{}) bool { |
| 56 | return callback(resource.(resources.SpaceResource).ToModel()) |
| 57 | }) |
| 58 | } |
| 59 | |
| 60 | func (repo CloudControllerSpaceRepository) FindByName(name string) (space models.Space, apiErr error) { |
| 61 | return repo.FindByNameInOrg(name, repo.config.OrganizationFields().GUID) |
nothing calls this directly
no test coverage detected