Documentation
¶
Index ¶
- func FormatKeyForDisplay(k string) string
- type AssumeRoleProvider
- type Config
- type ConfigLoader
- type CredentialKeyring
- func (ck *CredentialKeyring) CredentialsKeys() (credentialsNames []string, err error)
- func (ck *CredentialKeyring) Get(credentialsName string) (creds *Credentials, err error)
- func (ck *CredentialKeyring) Has(credentialsName string) (bool, error)
- func (ck *CredentialKeyring) Remove(credentialsName string) error
- func (ck *CredentialKeyring) Set(credentialsName string, creds *Credentials) error
- type Credentials
- type TempCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatKeyForDisplay ¶
Types ¶
type AssumeRoleProvider ¶
type AssumeRoleProvider struct {
// contains filtered or unexported fields
}
func (AssumeRoleProvider) Retrieve ¶
func (p AssumeRoleProvider) Retrieve() (*TempCredentials, error)
type Config ¶
type Config struct { // ProfileName specifies the name of the profile config ProfileName string // Region is the Alicloud region Region string // AssumeRole config RoleARN string RoleSessionName string // Specifies the wanted duration for credentials generated with AssumeRole AssumeRoleDuration int }
Config is a collection of configuration options for creating temporary credentials
type ConfigLoader ¶
type ConfigLoader struct { BaseConfig Config AliyunConfig config.Configuration }
func (*ConfigLoader) AddNewProfile ¶ added in v1.0.1
func (cl *ConfigLoader) AddNewProfile(name string) error
func (*ConfigLoader) GetProfileNames ¶
func (cl *ConfigLoader) GetProfileNames() []string
func (*ConfigLoader) Init ¶ added in v1.0.1
func (cl *ConfigLoader) Init() error
func (*ConfigLoader) LoadProfile ¶
func (cl *ConfigLoader) LoadProfile(profileName string) (*Config, error)
Init loads the profile from the config file and environment variables into config
type CredentialKeyring ¶
func (*CredentialKeyring) CredentialsKeys ¶
func (ck *CredentialKeyring) CredentialsKeys() (credentialsNames []string, err error)
func (*CredentialKeyring) Get ¶
func (ck *CredentialKeyring) Get(credentialsName string) (creds *Credentials, err error)
func (*CredentialKeyring) Has ¶
func (ck *CredentialKeyring) Has(credentialsName string) (bool, error)
func (*CredentialKeyring) Remove ¶
func (ck *CredentialKeyring) Remove(credentialsName string) error
func (*CredentialKeyring) Set ¶
func (ck *CredentialKeyring) Set(credentialsName string, creds *Credentials) error
type Credentials ¶
func NewCredentials ¶
func NewCredentials(accessKeyID, secretAccessKey string) *Credentials
type TempCredentials ¶
type TempCredentials struct { Creds *Credentials StsToken string Duration string }
func GenerateTempCredentials ¶
func GenerateTempCredentials(config *Config, k *CredentialKeyring) (*TempCredentials, error)
func NewTempCredentials ¶
func NewTempCredentials(creds *Credentials, stsToken string, duration string) *TempCredentials
Click to show internal directories.
Click to hide internal directories.