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

Method GetResource

cf/net/gateway.go:89–97  ·  view source on GitHub ↗
(url string, resource interface{})

Source from the content-addressed store, hash-verified

87}
88
89func (gateway Gateway) GetResource(url string, resource interface{}) (err error) {
90 request, err := gateway.NewRequest("GET", url, gateway.config.AccessToken(), nil)
91 if err != nil {
92 return
93 }
94
95 _, err = gateway.PerformRequestForJSONResponse(request, resource)
96 return
97}
98
99func (gateway Gateway) CreateResourceFromStruct(endpoint, url string, resource interface{}) error {
100 data, err := json.Marshal(resource)

Callers 15

getSSHEndpointInfoMethod · 0.80
GetSummariesMethod · 0.80
ClientExistsMethod · 0.80
GetSummaryMethod · 0.80
CheckIfExistsMethod · 0.80
FindByGUIDMethod · 0.80
getCCAPIInfoMethod · 0.80

Calls 3

NewRequestMethod · 0.95
AccessTokenMethod · 0.65

Tested by

no test coverage detected