(endpoint string)
| 19 | } |
| 20 | |
| 21 | func (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 | |
| 40 | func (repo RemoteInfoRepository) getCCAPIInfo(endpoint string) (*coreconfig.CCInfo, error) { |
| 41 | serverResponse := new(coreconfig.CCInfo) |
nothing calls this directly
no test coverage detected