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

Method GetApp

cf/api/applications/applications.go:60–71  ·  view source on GitHub ↗
(appGUID string)

Source from the content-addressed store, hash-verified

58}
59
60func (repo CloudControllerRepository) GetApp(appGUID string) (app models.Application, apiErr error) {
61 path := fmt.Sprintf("%s/v2/apps/%s", repo.config.APIEndpoint(), appGUID)
62 appResources := new(resources.ApplicationResource)
63
64 apiErr = repo.gateway.GetResource(path, appResources)
65 if apiErr != nil {
66 return
67 }
68
69 app = appResources.ToModel()
70 return
71}
72
73func (repo CloudControllerRepository) Read(name string) (app models.Application, apiErr error) {
74 return repo.ReadFromSpace(name, repo.config.SpaceFields().GUID)

Callers

nothing calls this directly

Calls 3

GetResourceMethod · 0.80
APIEndpointMethod · 0.65
ToModelMethod · 0.45

Tested by

no test coverage detected