(api *spec.API)
| 53 | } |
| 54 | |
| 55 | func APIEndpoint(api *spec.API) (string, error) { |
| 56 | var err error |
| 57 | baseAPIEndpoint := "" |
| 58 | |
| 59 | baseAPIEndpoint, err = APILoadBalancerURL() |
| 60 | if err != nil { |
| 61 | return "", err |
| 62 | } |
| 63 | baseAPIEndpoint = strings.Replace(baseAPIEndpoint, "https://", "http://", 1) |
| 64 | |
| 65 | return urls.Join(baseAPIEndpoint, *api.Networking.Endpoint), nil |
| 66 | } |
| 67 | |
| 68 | func APIEndpointFromResource(deployedResource *DeployedResource) (string, error) { |
| 69 | apiEndpoint, err := userconfig.EndpointFromAnnotation(deployedResource.VirtualService) |
no test coverage detected