Documentation ¶
Index ¶
- Constants
- Variables
- func GetEndpoint(res runtime.Object, region string) (string, error)
- func GetProviderConfig(ctx context.Context, k8sClient client.Client, providerConfigName string) (*aliv1beta1.ProviderConfig, error)
- func GetRegion(ctx context.Context, client client.Client, providerConfigName string) (string, error)
- type AlibabaCredentials
- type ClientEstablishmentInfo
Constants ¶
View Source
const ( // ErrGetProviderConfig is the error of getting provider config ErrGetProviderConfig = "failed to get ProviderConfig" // ErrGetCredentials is the error of getting credentials ErrGetCredentials = "cannot get credentials" // ErrAccessKeyNotComplete is the error of not existing of AccessKeyID or AccessKeySecret ErrAccessKeyNotComplete = "AccessKeyID or AccessKeySecret not existed" )
View Source
const ( // ErrPrepareClientEstablishmentInfo is the error of failing to prepare all the information for establishing an SDK client ErrPrepareClientEstablishmentInfo string = "failed to prepare all the information for establishing an SDK client" )
Variables ¶
View Source
var Domain = "aliyuncs.com"
Domain is Alibaba Cloud Domain
Functions ¶
func GetEndpoint ¶
GetEndpoint gets endpoints for all cloud resources
func GetProviderConfig ¶
func GetProviderConfig(ctx context.Context, k8sClient client.Client, providerConfigName string) (*aliv1beta1.ProviderConfig, error)
GetProviderConfig gets ProviderConfig
Types ¶
type AlibabaCredentials ¶
type AlibabaCredentials struct { AccessKeyID string `yaml:"accessKeyId"` AccessKeySecret string `yaml:"accessKeySecret"` SecurityToken string `yaml:"securityToken"` }
AlibabaCredentials represents ak/sk, stsToken(maybe) information
func GetCredentials ¶
func GetCredentials(ctx context.Context, client client.Client, providerConfigName string) (*AlibabaCredentials, error)
GetCredentials gets Alibaba credentials from ProviderConfig
type ClientEstablishmentInfo ¶
type ClientEstablishmentInfo struct { AlibabaCredentials `json:",inline"` Region string `json:"region"` Endpoint string `json:"endpoint"` }
ClientEstablishmentInfo represents all the information for establishing an SDK client
Click to show internal directories.
Click to hide internal directories.