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

Method Delete

cf/api/service_bindings.go:49–63  ·  view source on GitHub ↗
(instance models.ServiceInstance, appGUID string)

Source from the content-addressed store, hash-verified

47}
48
49func (repo CloudControllerServiceBindingRepository) Delete(instance models.ServiceInstance, appGUID string) (bool, error) {
50 var path string
51 for _, binding := range instance.ServiceBindings {
52 if binding.AppGUID == appGUID {
53 path = binding.URL
54 break
55 }
56 }
57
58 if path == "" {
59 return false, nil
60 }
61
62 return true, repo.gateway.DeleteResource(repo.config.APIEndpoint(), path)
63}
64
65func (repo CloudControllerServiceBindingRepository) ListAllForService(instanceGUID string) ([]models.ServiceBindingFields, error) {
66 serviceBindings := []models.ServiceBindingFields{}

Callers

nothing calls this directly

Calls 2

DeleteResourceMethod · 0.80
APIEndpointMethod · 0.65

Tested by

no test coverage detected