github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/actor/v2action/space_quota.go (about) 1 package v2action 2 3 import ( 4 "code.cloudfoundry.org/cli/actor/actionerror" 5 "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" 6 "code.cloudfoundry.org/cli/api/cloudcontroller/ccv2" 7 ) 8 9 type SpaceQuota ccv2.SpaceQuota 10 11 func (actor Actor) GetSpaceQuota(guid string) (SpaceQuota, Warnings, error) { 12 spaceQuota, warnings, err := actor.CloudControllerClient.GetSpaceQuotaDefinition(guid) 13 14 if _, ok := err.(ccerror.ResourceNotFoundError); ok { 15 return SpaceQuota{}, Warnings(warnings), actionerror.SpaceQuotaNotFoundError{GUID: guid} 16 } 17 18 return SpaceQuota(spaceQuota), Warnings(warnings), err 19 }