Documentation ¶
Index ¶
- Constants
- func AuthenticateAPIKey(apikey string, config *ibmcloud.Config) error
- func AuthenticatePassword(username string, password string, config *ibmcloud.Config) error
- func AuthenticateSSO(passcode string, config *ibmcloud.Config) error
- func ComputeClusterConfigDir(name string) (string, error)
- func ConfigFromJSON(config *ibmcloud.Config) (accountID string, err error)
- func Filter(vs []containerv1.KubeVersion, f func(containerv1.KubeVersion) bool) []containerv1.KubeVersion
- func GetAuthRegions(config *ibmcloud.Config) ([]string, error)
- func GetClusterID() (string, error)
- func GetClusterName() (string, error)
- func GetClusterRegistry(kubeClient kubernetes.Interface) string
- func GetKubeClusterID(kubeClient kubernetes.Interface) (string, error)
- func GetKubeClusterRegion(kubeClient kubernetes.Interface) (string, error)
- func GetKubeVersions(versions containerv1.KubeVersions) ([]string, string, error)
- func GetMachineTypes(zone Zone, region Region, machinetypes MachineTypes) ([]string, error)
- func GetPrivateVLANs(zone Zone, region Region, vlans VLANs) ([]string, error)
- func GetPublicVLANs(zone Zone, region Region, vlans VLANs) ([]string, error)
- func GetRegions(regions Regions) ([]string, error)
- func GetRegistryConfigJSON(registry string) (string, error)
- func GetZones(region Region, zones Zones) ([]string, error)
- func InstallIBMCloud(skipPathScan bool) error
- func InstallIBMCloudWithVersion(version string, skipPathScan bool) error
- func RefreshTokenToLinkAccounts(account *Account, config *ibmcloud.Config) error
- type Account
- type AccountEntity
- type AccountNameQueryResponse
- type AccountOrganization
- type AccountQueryResponse
- type AccountResource
- type AccountServiceAPI
- type Accounts
- type AddTokenResponse
- type Auth
- type BluemixSubscription
- type ClusterConfig
- type Clusters
- type Config
- type ConfigJSON
- type IAMAuthRepository
- func (auth *IAMAuthRepository) AuthenticateAPIKey(apiKey string) error
- func (auth *IAMAuthRepository) AuthenticatePassword(username string, password string) error
- func (auth *IAMAuthRepository) AuthenticateSSO(passcode string) error
- func (auth *IAMAuthRepository) RefreshToken() (string, error)
- func (auth *IAMAuthRepository) RefreshTokenToLinkAccounts(account *Account) error
- type IAMError
- type IAMTokenResponse
- type KubernetesServiceAPI
- type Linkage
- type MachineType
- type MachineTypes
- type Metadata
- type Region
- type RegionResponse
- type Regions
- type Registry
- type RegistryServiceAPI
- type Resource
- type VLAN
- type VLANs
- type Zone
- type Zones
Constants ¶
View Source
const ( ErrCodeNotAuthorized = "NotAuthorized" ErrCodeUnableToAuthenticate = "UnableToAuthenticate" )
View Source
const (
//ErrCodeInvalidToken ...
ErrCodeInvalidToken = "InvalidToken"
)
Variables ¶
This section is empty.
Functions ¶
func AuthenticatePassword ¶
func ComputeClusterConfigDir ¶
func Filter ¶
func Filter(vs []containerv1.KubeVersion, f func(containerv1.KubeVersion) bool) []containerv1.KubeVersion
func GetClusterID ¶
func GetClusterName ¶
func GetClusterRegistry ¶
func GetClusterRegistry(kubeClient kubernetes.Interface) string
Try to use the regional registry used by the cluster We will also set the corresponding secret for jenkins-x right away
func GetKubeClusterID ¶
func GetKubeClusterID(kubeClient kubernetes.Interface) (string, error)
func GetKubeClusterRegion ¶
func GetKubeClusterRegion(kubeClient kubernetes.Interface) (string, error)
func GetKubeVersions ¶
func GetKubeVersions(versions containerv1.KubeVersions) ([]string, string, error)
func GetMachineTypes ¶
func GetMachineTypes(zone Zone, region Region, machinetypes MachineTypes) ([]string, error)
func GetPrivateVLANs ¶
func GetRegions ¶
func GetRegistryConfigJSON ¶
func InstallIBMCloud ¶
func InstallIBMCloudWithVersion ¶
InstallIBMCloudWithVersion installs a specific version of IBM cloud CLI
Types ¶
type Account ¶
type Account struct { GUID string Name string Type string State string OwnerGUID string OwnerUserID string OwnerUniqueID string CustomerID string CountryCode string CurrencyCode string Organizations []AccountOrganization IMSAccountID string }
Account Model ...
type AccountEntity ¶
type AccountEntity struct { Name string `json:"name"` Type string `json:"type"` State string `json:"state"` OwnerGUID string `json:"owner"` OwnerUserID string `json:"owner_userid"` OwnerUniqueID string `json:"owner_unique_id"` CustomerID string `json:"customer_id"` CountryCode string `json:"country_code"` CurrencyCode string `json:"currency_code"` Organizations []AccountOrganization `json:"organizations_region"` Linkages []Linkage `json:"linkages"` BluemixSubscriptions []BluemixSubscription `json:"bluemix_subscriptions"` }
AccountEntity ...
type AccountNameQueryResponse ¶
type AccountNameQueryResponse struct { Metadata Metadata Entity AccountEntity }
AccountQueryResponse ...
func (AccountNameQueryResponse) ToModel ¶
func (nameQueryResponse AccountNameQueryResponse) ToModel() Account
type AccountOrganization ¶
AccountOrganization ...
type AccountQueryResponse ¶
type AccountQueryResponse struct { Metadata Metadata Accounts []AccountResource `json:"resources"` }
AccountQueryResponse ...
type AccountResource ¶
type AccountResource struct { Resource Entity AccountEntity }
AccountResource ...
type AccountServiceAPI ¶
type AccountServiceAPI interface {
Accounts() Accounts
}
AccountServiceAPI is the accountv2 client ...
func NewAccountServiceAPI ¶
func NewAccountServiceAPI(sess *session.Session) (AccountServiceAPI, error)
New ...
type Accounts ¶
type Accounts interface { List() ([]Account, error) FindByOrg(orgGUID string, region string) (*Account, error) FindByOwner(userID string) (*Account, error) Get(accountId string) (*Account, error) }
Accounts ...
type AddTokenResponse ¶
type AddTokenResponse struct {
Token string `json:"token"`
}
type BluemixSubscription ¶
type BluemixSubscription struct {
SoftlayerAccountID string `json:"softlayer_account_id"`
}
type ClusterConfig ¶
type ClusterConfig struct { ClusterID string `json:"cluster_id"` ClusterName string `json:"cluster_name"` ClusterType string `json:"cluster_type"` ClusterPayTier string `json:"cluster_pay_tier"` Datacenter string `json:"datacenter"` AccountID string `json:"account_id"` Created string `json:"created"` }
This name is the name known to cruiser
type Clusters ¶
type Clusters interface {
GetClusterConfig(name string, target containerv1.ClusterTargetHeader) (string, error)
}
type ConfigJSON ¶
type ConfigJSON struct { APIEndpoint string `json:"APIEndpoint"` ConsoleEndpoint string `json:"ConsoleEndpoint"` Region string `json:"Region"` RegionID string `json:"RegionID"` RegionType string `json:"RegionType"` IAMEndpoint string `json:"IAMEndpoint"` IAMToken string `json:"IAMToken"` IAMRefreshToken string `json:"IAMRefreshToken"` Account struct { GUID string `json:"GUID"` Name string `json:"Name"` Owner string `json:"Owner"` } `json:"Account"` ResourceGroup struct { GUID string `json:"GUID"` Name string `json:"Name"` State string `json:"State"` Default bool `json:"Default"` QuotaID string `json:"QuotaID"` } `json:"ResourceGroup"` CFEETargeted bool `json:"CFEETargeted"` CFEEEnvID string `json:"CFEEEnvID"` PluginRepos []struct { Name string `json:"Name"` URL string `json:"URL"` } `json:"PluginRepos"` SSLDisabled bool `json:"SSLDisabled"` Locale string `json:"Locale"` Trace string `json:"Trace"` ColorEnabled string `json:"ColorEnabled"` HTTPTimeout int `json:"HTTPTimeout"` CLIInfoEndpoint string `json:"CLIInfoEndpoint"` CheckCLIVersionDisabled bool `json:"CheckCLIVersionDisabled"` UsageStatsDisabled bool `json:"UsageStatsDisabled"` SDKVersion string `json:"SDKVersion"` UpdateCheckInterval int `json:"UpdateCheckInterval"` UpdateRetryCheckInterval int `json:"UpdateRetryCheckInterval"` UpdateNotificationInterval int `json:"UpdateNotificationInterval"` }
type IAMAuthRepository ¶
type IAMAuthRepository struct {
// contains filtered or unexported fields
}
IAMAuthRepository ...
func NewIAMAuthRepository ¶
NewIAMAuthRepository ...
func (*IAMAuthRepository) AuthenticateAPIKey ¶
func (auth *IAMAuthRepository) AuthenticateAPIKey(apiKey string) error
AuthenticateAPIKey ...
func (*IAMAuthRepository) AuthenticatePassword ¶
func (auth *IAMAuthRepository) AuthenticatePassword(username string, password string) error
AuthenticatePassword ...
func (*IAMAuthRepository) AuthenticateSSO ¶
func (auth *IAMAuthRepository) AuthenticateSSO(passcode string) error
AuthenticateSSO ...
func (*IAMAuthRepository) RefreshToken ¶
func (auth *IAMAuthRepository) RefreshToken() (string, error)
RefreshToken ...
func (*IAMAuthRepository) RefreshTokenToLinkAccounts ¶
func (auth *IAMAuthRepository) RefreshTokenToLinkAccounts(account *Account) error
type IAMError ¶
type IAMError struct { ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` ErrorDetails string `json:"errorDetails"` }
IAMError ...
type IAMTokenResponse ¶
type IAMTokenResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` UAAAccessToken string `json:"uaa_token"` UAARefreshToken string `json:"uaa_refresh_token"` TokenType string `json:"token_type"` }
IAMTokenResponse ...
type KubernetesServiceAPI ¶
type KubernetesServiceAPI interface { Zones() Zones Regions() Regions MachineTypes() MachineTypes VLANs() VLANs Clusters() Clusters }
func NewSessionless ¶
func NewSessionless(sess *session.Session) (KubernetesServiceAPI, error)
No auth session is required for region and zone calls
type MachineType ¶
type MachineTypes ¶
type MachineTypes interface { GetMachineTypes(zone Zone, region Region) ([]MachineType, error) GetMachineType(machinetypearg string, zone Zone, region Region) (*MachineType, error) }
type RegionResponse ¶
type RegionResponse struct {
Regions []Region `json:"regions"`
}
type RegistryServiceAPI ¶
type RegistryServiceAPI interface {
Registry() Registry
}
func NewRegistryServiceAPI ¶
func NewRegistryServiceAPI(sess *session.Session) (RegistryServiceAPI, error)
New ...
type VLAN ¶
type VLAN struct { ID string `json:"id"` Type string `json:"type"` Properties struct { Name string `json:"name"` Note string `json:"note"` PrimaryRouter string `json:"primary_router"` VlanNumber string `json:"vlan_number"` VlanType string `json:"vlan_type"` Location string `json:"location"` LocalDiskStorageCapability string `json:"local_disk_storage_capability"` SanStorageCapability string `json:"san_storage_capability"` } `json:"properties"` }
Click to show internal directories.
Click to hide internal directories.