(path string)
| 96 | } |
| 97 | |
| 98 | func (repo CloudControllerServiceRepository) getServiceOfferings(path string) ([]models.ServiceOffering, error) { |
| 99 | var offerings []models.ServiceOffering |
| 100 | apiErr := repo.gateway.ListPaginatedResources( |
| 101 | repo.config.APIEndpoint(), |
| 102 | path, |
| 103 | resources.ServiceOfferingResource{}, |
| 104 | func(resource interface{}) bool { |
| 105 | if so, ok := resource.(resources.ServiceOfferingResource); ok { |
| 106 | offerings = append(offerings, so.ToModel()) |
| 107 | } |
| 108 | return true |
| 109 | }) |
| 110 | |
| 111 | return offerings, apiErr |
| 112 | } |
| 113 | |
| 114 | func (repo CloudControllerServiceRepository) FindInstanceByName(name string) (instance models.ServiceInstance, apiErr error) { |
| 115 | path := fmt.Sprintf("%s/v2/spaces/%s/service_instances?return_user_provided_service_instances=true&q=%s&inline-relations-depth=1", repo.config.APIEndpoint(), repo.config.SpaceFields().GUID, url.QueryEscape("name:"+name)) |
no test coverage detected