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

Method GetCCInfo

cf/api/endpoints.go:21–38  ·  view source on GitHub ↗
(endpoint string)

Source from the content-addressed store, hash-verified

19}
20
21func (repo RemoteInfoRepository) GetCCInfo(endpoint string) (*coreconfig.CCInfo, string, error) {
22 if strings.HasPrefix(endpoint, "http") {
23 serverResponse, err := repo.getCCAPIInfo(endpoint)
24 if err != nil {
25 return nil, "", err
26 }
27
28 return serverResponse, endpoint, nil
29 }
30
31 finalEndpoint := "https://" + endpoint
32 serverResponse, err := repo.getCCAPIInfo(finalEndpoint)
33 if err != nil {
34 return nil, "", err
35 }
36
37 return serverResponse, finalEndpoint, nil
38}
39
40func (repo RemoteInfoRepository) getCCAPIInfo(endpoint string) (*coreconfig.CCInfo, error) {
41 serverResponse := new(coreconfig.CCInfo)

Callers

nothing calls this directly

Calls 1

getCCAPIInfoMethod · 0.95

Tested by

no test coverage detected