github.com/sleungcy/cli@v7.1.0+incompatible/actor/v2action/service_instance_shared_to.go (about) 1 package v2action 2 3 import "code.cloudfoundry.org/cli/api/cloudcontroller/ccv2" 4 5 type ServiceInstanceSharedTo ccv2.ServiceInstanceSharedTo 6 7 func (actor Actor) GetServiceInstanceSharedTosByServiceInstance(serviceInstanceGUID string) ([]ServiceInstanceSharedTo, Warnings, error) { 8 sharedTos, warnings, err := actor.CloudControllerClient.GetServiceInstanceSharedTos(serviceInstanceGUID) 9 if err != nil { 10 return nil, Warnings(warnings), err 11 } 12 13 var serviceInstanceSharedTos = make([]ServiceInstanceSharedTo, len(sharedTos)) 14 for i, sharedTo := range sharedTos { 15 serviceInstanceSharedTos[i] = ServiceInstanceSharedTo(sharedTo) 16 } 17 18 return serviceInstanceSharedTos, Warnings(warnings), nil 19 }