Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialProviderChain ¶
type CredentialProviderChain struct {
// contains filtered or unexported fields
}
func BasicCredentialProviderChain ¶
func BasicCredentialProviderChain() *CredentialProviderChain
BasicCredentialProviderChain return a provider chain for basic.Credentials
func DefaultCredentialProviderChain ¶
func DefaultCredentialProviderChain(credentialType string) *CredentialProviderChain
DefaultCredentialProviderChain return a default credential provider chain Supported credential types: basic, global Default order: environment variables -> profile -> metadata
func GlobalCredentialProviderChain ¶
func GlobalCredentialProviderChain() *CredentialProviderChain
GlobalCredentialProviderChain return a provider chain for global.Credentials
func NewCredentialProviderChain ¶
func NewCredentialProviderChain(providers []ICredentialProvider) *CredentialProviderChain
NewCredentialProviderChain return a credential provider chain
func (*CredentialProviderChain) GetCredentials ¶
func (p *CredentialProviderChain) GetCredentials() (auth.ICredential, error)
GetCredentials get basic.Credentials or global.Credentials in providers In the order of providers, return the first found credentials If credentials not found in every providers, return a error of all providers
type EnvCredentialProvider ¶
type EnvCredentialProvider struct {
// contains filtered or unexported fields
}
func BasicCredentialEnvProvider ¶
func BasicCredentialEnvProvider() *EnvCredentialProvider
BasicCredentialEnvProvider return a env provider for basic.Credentials
func GlobalCredentialEnvProvider ¶
func GlobalCredentialEnvProvider() *EnvCredentialProvider
GlobalCredentialEnvProvider return a env provider for global.Credentials
func NewEnvCredentialProvider ¶
func NewEnvCredentialProvider(credentialType string) *EnvCredentialProvider
NewEnvCredentialProvider return a env credential provider Supported credential types: basic, global
func (*EnvCredentialProvider) GetCredentials ¶
func (p *EnvCredentialProvider) GetCredentials() (auth.ICredential, error)
GetCredentials get basic.Credentials or global.Credentials from environment variables
type ICredentialProvider ¶
type ICredentialProvider interface {
GetCredentials() (auth.ICredential, error)
}
type MetadataCredentialProvider ¶
type MetadataCredentialProvider struct {
// contains filtered or unexported fields
}
func BasicCredentialMetadataProvider ¶
func BasicCredentialMetadataProvider() *MetadataCredentialProvider
BasicCredentialMetadataProvider return a metadata provider for basic.Credentials
func GlobalCredentialMetadataProvider ¶
func GlobalCredentialMetadataProvider() *MetadataCredentialProvider
GlobalCredentialMetadataProvider return a metadata provider for global.Credentials
func NewMetadataCredentialProvider ¶
func NewMetadataCredentialProvider(credentialType string) *MetadataCredentialProvider
NewMetadataCredentialProvider return a metadata credential provider Supported credential types: basic, global
func (*MetadataCredentialProvider) GetCredentials ¶
func (p *MetadataCredentialProvider) GetCredentials() (auth.ICredential, error)
GetCredentials get basic.Credentials or global.Credentials from the instance's metadata
type ProfileCredentialProvider ¶
type ProfileCredentialProvider struct {
// contains filtered or unexported fields
}
func BasicCredentialProfileProvider ¶
func BasicCredentialProfileProvider() *ProfileCredentialProvider
BasicCredentialProfileProvider return a profile provider for basic.Credentials
func GlobalCredentialProfileProvider ¶
func GlobalCredentialProfileProvider() *ProfileCredentialProvider
GlobalCredentialProfileProvider return a profile provider for global.Credentials
func NewProfileCredentialProvider ¶
func NewProfileCredentialProvider(credentialType string) *ProfileCredentialProvider
NewProfileCredentialProvider return a profile credential provider Supported credential types: basic, global
func (*ProfileCredentialProvider) GetCredentials ¶
func (p *ProfileCredentialProvider) GetCredentials() (auth.ICredential, error)
GetCredentials get basic.Credentials or global.Credentials from profile