Documentation
¶
Index ¶
Constants ¶
View Source
const ( UCloudPublicKeyEnvVar = "UCLOUD_PUBLIC_KEY" UCloudPrivateKeyEnvVar = "UCLOUD_PRIVATE_KEY" UCloudProjectIdEnvVar = "UCLOUD_PROJECT_ID" UCloudRegionEnvVar = "UCLOUD_REGION" )
View Source
const DefaultProfile = "default"
DefaultProfile is the default named profile for ucloud sdk
Variables ¶
This section is empty.
Functions ¶
func DefaultSharedConfigFile ¶
func DefaultSharedConfigFile() string
DefaultSharedConfigFile will return the default shared config filename
func DefaultSharedCredentialsFile ¶
func DefaultSharedCredentialsFile() string
DefaultSharedCredentialsFile will return the default shared credential filename
func LoadUCloudConfigFile ¶
LoadUCloudConfigFile will load ucloud client config from config file
func LoadUCloudCredentialFile ¶
func LoadUCloudCredentialFile(credFile, profile string) (*auth.Credential, error)
LoadUCloudCredentialFile will load ucloud credential config from config file
Types ¶
type ConfigProvider ¶
type ConfigProvider interface { Credential() *auth.Credential Config() *ucloud.Config }
ConfigProvider is the provider to store and provide config/credential instance
func LoadDefaultUCloudConfig ¶
func LoadDefaultUCloudConfig() (ConfigProvider, error)
LoadDefaultUCloudConfig is the default loader to load config
Click to show internal directories.
Click to hide internal directories.