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

Method UpdateResourceFromStruct

cf/net/gateway.go:108–115  ·  view source on GitHub ↗
(endpoint, apiURL string, resource interface{})

Source from the content-addressed store, hash-verified

106}
107
108func (gateway Gateway) UpdateResourceFromStruct(endpoint, apiURL string, resource interface{}) error {
109 data, err := json.Marshal(resource)
110 if err != nil {
111 return err
112 }
113
114 return gateway.UpdateResource(endpoint, apiURL, bytes.NewReader(data))
115}
116
117func (gateway Gateway) CreateResource(endpoint, apiURL string, body io.ReadSeeker, resource ...interface{}) error {
118 return gateway.createUpdateOrDeleteResource("POST", endpoint, apiURL, body, false, resource...)

Callers 5

UpdateMethod · 0.80
BindMethod · 0.80
BindSpaceMethod · 0.80
UpdateMethod · 0.80
UpdateMethod · 0.80

Calls 1

UpdateResourceMethod · 0.95

Tested by

no test coverage detected