MCPcopy Index your code
hub / github.com/cloudfoundry/cli / GetSpaces

Method GetSpaces

api/cloudcontroller/ccv3/space.go:30–44  ·  view source on GitHub ↗

GetSpaces lists spaces with optional filters.

(query ...Query)

Source from the content-addressed store, hash-verified

28
29// GetSpaces lists spaces with optional filters.
30func (client *Client) GetSpaces(query ...Query) ([]resources.Space, IncludedResources, Warnings, error) {
31 var returnedResources []resources.Space
32
33 includedResources, warnings, err := client.MakeListRequest(RequestParams{
34 RequestName: internal.GetSpacesRequest,
35 Query: query,
36 ResponseBody: resources.Space{},
37 AppendToList: func(item interface{}) error {
38 returnedResources = append(returnedResources, item.(resources.Space))
39 return nil
40 },
41 })
42
43 return returnedResources, includedResources, warnings, err
44}
45
46func (client *Client) UpdateSpace(space resources.Space) (resources.Space, Warnings, error) {
47 spaceGUID := space.GUID

Callers

nothing calls this directly

Calls 1

MakeListRequestMethod · 0.65

Tested by

no test coverage detected