MCPcopy Create free account
hub / github.com/cloudfoundry/cli / ListServiceAppBindings

Method ListServiceAppBindings

actor/v7action/service_app_binding.go:100–130  ·  view source on GitHub ↗
(params ListServiceAppBindingParams)

Source from the content-addressed store, hash-verified

98}
99
100func (actor Actor) ListServiceAppBindings(params ListServiceAppBindingParams) ([]resources.ServiceCredentialBinding, Warnings, error) {
101 var (
102 serviceInstance resources.ServiceInstance
103 app resources.Application
104 bindings []resources.ServiceCredentialBinding
105 )
106
107 warnings, err := railway.Sequentially(
108 func() (warnings ccv3.Warnings, err error) {
109 serviceInstance, _, warnings, err = actor.getServiceInstanceByNameAndSpace(params.ServiceInstanceName, params.SpaceGUID)
110 return
111 },
112 func() (warnings ccv3.Warnings, err error) {
113 app, warnings, err = actor.CloudControllerClient.GetApplicationByNameAndSpace(params.AppName, params.SpaceGUID)
114 return
115 },
116 func() (warnings ccv3.Warnings, err error) {
117 bindings, warnings, err = actor.getServiceAppBindings(serviceInstance.GUID, app.GUID)
118 return
119 },
120 )
121
122 switch err.(type) {
123 case nil:
124 return bindings, Warnings(warnings), nil
125 case ccerror.ApplicationNotFoundError:
126 return nil, Warnings(warnings), actionerror.ApplicationNotFoundError{Name: params.AppName}
127 default:
128 return nil, Warnings(warnings), err
129 }
130}
131
132func (actor Actor) DeleteServiceAppBinding(params DeleteServiceAppBindingParams) (chan PollJobEvent, Warnings, error) {
133 var (

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 5

getServiceAppBindingsMethod · 0.95
SequentiallyFunction · 0.92
WarningsTypeAlias · 0.70

Tested by

no test coverage detected