(hostname string)
| 44 | } |
| 45 | |
| 46 | func GraphQLEndpoint(hostname string) string { |
| 47 | if isGarage(hostname) { |
| 48 | return fmt.Sprintf("https://%s/api/graphql", hostname) |
| 49 | } |
| 50 | if ghauth.IsEnterprise(hostname) { |
| 51 | return fmt.Sprintf("https://%s/api/graphql", hostname) |
| 52 | } |
| 53 | if strings.EqualFold(hostname, localhost) { |
| 54 | return fmt.Sprintf("http://api.%s/graphql", hostname) |
| 55 | } |
| 56 | return fmt.Sprintf("https://api.%s/graphql", hostname) |
| 57 | } |
| 58 | |
| 59 | func RESTPrefix(hostname string) string { |
| 60 | if isGarage(hostname) { |