Documentation
¶
Index ¶
- Constants
- Variables
- func GetConfigDirectory() (string, error)
- func GetConfigFilePath() (string, error)
- type AccessRequestsJiraConfiguration
- type BackplaneConfiguration
- func (config *BackplaneConfiguration) CheckAPIConnection() error
- func (config *BackplaneConfiguration) DisplayKubePS1Warning() bool
- func (config *BackplaneConfiguration) GetAwsProxy() *string
- func (config *BackplaneConfiguration) GetBackplaneURL() (string, error)
- func (config *BackplaneConfiguration) GetBackplaneURLWithConn(ocmConn *ocmsdk.Connection) (string, error)
- func (config *BackplaneConfiguration) GetFirstWorkingProxyURL(s []string) string
- type JiraTransitionsNamesForAccessRequests
Constants ¶
const ( JiraTokenViperKey = "jira-token" JiraConfigForAccessRequestsKey = "jira-config-for-access-requests" JiraBaseURLDefaultValue = "https://issues.redhat.com" GovcloudDefaultValue bool = false GovcloudDefaultValueKey = "govcloud" )
Variables ¶
var JiraConfigForAccessRequestsDefaultValue = AccessRequestsJiraConfiguration{ DefaultProject: "SDAINT", DefaultIssueType: "Story", ProdProject: "OHSS", ProdIssueType: "Incident", ProjectToTransitionsNames: map[string]JiraTransitionsNamesForAccessRequests{ "SDAINT": { OnCreation: "In Progress", OnApproval: "In Progress", OnError: "Closed", }, "OHSS": { OnCreation: "Pending Customer", OnApproval: "New", OnError: "Cancelled", }, }, }
Functions ¶
func GetConfigDirectory ¶ added in v0.1.32
GetConfigDirectory returns the backplane config path
func GetConfigFilePath ¶ added in v0.1.4
GetConfigFilePath returns the Backplane CLI configuration filepath
Types ¶
type AccessRequestsJiraConfiguration ¶ added in v0.1.34
type AccessRequestsJiraConfiguration struct {
DefaultProject string `json:"default-project"`
DefaultIssueType string `json:"default-issue-type"`
ProdProject string `json:"prod-project"`
ProdIssueType string `json:"prod-issue-type"`
ProjectToTransitionsNames map[string]JiraTransitionsNamesForAccessRequests `json:"project-to-transitions-names"`
}
type BackplaneConfiguration ¶
type BackplaneConfiguration struct {
URL string `json:"url"`
ProxyURL *string `json:"proxy-url"`
AwsProxy *string `json:"aws-proxy"`
SessionDirectory string `json:"session-dir"`
AssumeInitialArn string `json:"assume-initial-arn"`
ProdEnvName string `json:"prod-env-name"`
PagerDutyAPIKey string `json:"pd-key"`
JiraBaseURL string `json:"jira-base-url"`
JiraToken string `json:"jira-token"`
JiraConfigForAccessRequests AccessRequestsJiraConfiguration `json:"jira-config-for-access-requests"`
VPNCheckEndpoint string `json:"vpn-check-endpoint"`
ProxyCheckEndpoint string `json:"proxy-check-endpoint"`
DisplayClusterInfo bool `json:"display-cluster-info"`
DisableKubePS1Warning bool `json:"disable-kube-ps1-warning"`
Govcloud bool `json:"govcloud"`
SessionDurationMinutes int `json:"session-duration-minutes"`
}
BackplaneConfiguration represents the configuration for backplane-cli. Note: Please update the validateConfig function if there are any required keys added.
func GetBackplaneConfiguration ¶
func GetBackplaneConfiguration() (bpConfig BackplaneConfiguration, err error)
GetBackplaneConfiguration parses and returns the given backplane configuration
func GetBackplaneConfigurationWithConn ¶ added in v0.6.0
func GetBackplaneConfigurationWithConn(ocmConn *ocmsdk.Connection) (bpConfig BackplaneConfiguration, err error)
GetBackplaneConfiguration parses and returns the given backplane configuration using attributes from provided OCM connection
func (*BackplaneConfiguration) CheckAPIConnection ¶ added in v0.1.6
func (config *BackplaneConfiguration) CheckAPIConnection() error
CheckAPIConnection validate API connection via configured proxy and VPN
func (*BackplaneConfiguration) DisplayKubePS1Warning ¶ added in v0.1.47
func (config *BackplaneConfiguration) DisplayKubePS1Warning() bool
func (*BackplaneConfiguration) GetAwsProxy ¶ added in v0.4.0
func (config *BackplaneConfiguration) GetAwsProxy() *string
GetAwsProxy returns the proxy URL to use for AWS operations Priority: 1) AWS proxy from config, 2) regular proxy from config
func (*BackplaneConfiguration) GetBackplaneURL ¶ added in v0.1.21
func (config *BackplaneConfiguration) GetBackplaneURL() (string, error)
GetBackplaneURL returns API URL
func (*BackplaneConfiguration) GetBackplaneURLWithConn ¶ added in v0.6.0
func (config *BackplaneConfiguration) GetBackplaneURLWithConn(ocmConn *ocmsdk.Connection) (string, error)
GetBackplaneURL returns API URL
func (*BackplaneConfiguration) GetFirstWorkingProxyURL ¶ added in v0.6.0
func (config *BackplaneConfiguration) GetFirstWorkingProxyURL(s []string) string