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

Method Create

cf/api/service_bindings.go:33–47  ·  view source on GitHub ↗
(instanceGUID, appGUID string, paramsMap map[string]interface{})

Source from the content-addressed store, hash-verified

31}
32
33func (repo CloudControllerServiceBindingRepository) Create(instanceGUID, appGUID string, paramsMap map[string]interface{}) error {
34 path := "/v2/service_bindings"
35 request := models.ServiceBindingRequest{
36 AppGUID: appGUID,
37 ServiceInstanceGUID: instanceGUID,
38 Params: paramsMap,
39 }
40
41 jsonBytes, err := json.Marshal(request)
42 if err != nil {
43 return err
44 }
45
46 return repo.gateway.CreateResource(repo.config.APIEndpoint(), path, bytes.NewReader(jsonBytes))
47}
48
49func (repo CloudControllerServiceBindingRepository) Delete(instance models.ServiceInstance, appGUID string) (bool, error) {
50 var path string

Callers

nothing calls this directly

Calls 2

CreateResourceMethod · 0.80
APIEndpointMethod · 0.65

Tested by

no test coverage detected