Documentation ¶
Index ¶
Constants ¶
View Source
const ( OCMProductionURL = "https://api.openshift.com" OCMStagingURL = "https://api.stage.openshift.com" OCMIntegrationURL = "https://api.integration.openshift.com" )
View Source
const OfflineTokenPage = "https://console.redhat.com/openshift/token" // #nosec G101
OfflineTokenPage is the URL of the page used to generate offline access tokens.
Variables ¶
View Source
var OCMURLAliases = map[string]string{ "production": OCMProductionURL, "prod": OCMProductionURL, "prd": OCMProductionURL, "staging": OCMStagingURL, "stage": OCMStagingURL, "stg": OCMStagingURL, "integration": OCMIntegrationURL, "int": OCMIntegrationURL, }
Functions ¶
func Expand ¶
Expand returns full URI to UHC resources based on an alias. An alias allows for shortcuts on the CLI, such as replace "accts" with the full URI of the resource. Lists of resources require just the alias as a parameter, while getting/posting individual resources requires the additional ID of the resource.
func ResolveGatewayURL ¶ added in v0.1.73
func ResolveGatewayURL(optionalParsedCliFlagValue string, optionalParsedConfig *config.Config) (string, error)
URL Precedent (from highest priority to lowest priority):
- runtime `--url` cli arg (key found in `urlAliases`)
- runtime `--url` cli arg (non-empty string)
- config file `URL` value (non-empty string)
- sdk.DefaultURL
Finally, it will try to url.ParseRequestURI the resolved URL to make sure it's a valid URL.
func ValidOCMUrlAliases ¶ added in v0.1.73
func ValidOCMUrlAliases() []string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.