Versions in this module Expand all Collapse all v0 v0.1.1 Nov 18, 2020 v0.1.0 May 10, 2020 Changes in this version + var AnonymousCredentials = NewStaticCredentials("", "", "") + var ErrAccessKeyIDNotFound = apierr.New("EnvAccessKeyNotFound", ...) + var ErrNoValidProvidersFoundInChain = apierr.New("NoCredentialProviders", "no valid providers in chain", nil) + var ErrSecretAccessKeyNotFound = apierr.New("EnvSecretNotFound", ...) + var ErrSharedCredentialsHomeNotFound = apierr.New("UserHomeNotFound", "user home directory not found.", nil) + var ErrStaticCredentialsEmpty = apierr.New("EmptyStaticCreds", "static credentials are empty", nil) + type ChainProvider struct + Providers []Provider + func (c *ChainProvider) IsExpired() bool + func (c *ChainProvider) Retrieve() (Value, error) + type Credentials struct + func NewChainCredentials(providers []Provider) *Credentials + func NewCredentials(provider Provider) *Credentials + func NewEC2RoleCredentials(client *http.Client, endpoint string, window time.Duration) *Credentials + func NewEnvCredentials() *Credentials + func NewSharedCredentials(filename, profile string) *Credentials + func NewStaticCredentials(id, secret, token string) *Credentials + func (c *Credentials) Expire() + func (c *Credentials) Get() (Value, error) + func (c *Credentials) IsExpired() bool + type EC2RoleProvider struct + Client *http.Client + Endpoint string + ExpiryWindow time.Duration + func (m *EC2RoleProvider) IsExpired() bool + func (m *EC2RoleProvider) Retrieve() (Value, error) + type EnvProvider struct + func (e *EnvProvider) IsExpired() bool + func (e *EnvProvider) Retrieve() (Value, error) + type ErrSyntax struct + Line int + Source string + func (e ErrSyntax) Error() string + type File map[string]Section + func Load(in io.Reader) (File, error) + func LoadFile(filename string) (File, error) + func (f File) Get(section, key string) (value string, ok bool) + func (f File) Load(in io.Reader) (err error) + func (f File) LoadFile(file string) (err error) + func (f File) Section(name string) Section + type Provider interface + IsExpired func() bool + Retrieve func() (Value, error) + type Section map[string]string + type SharedCredentialsProvider struct + Filename string + Profile string + func (p *SharedCredentialsProvider) IsExpired() bool + func (p *SharedCredentialsProvider) Retrieve() (Value, error) + type StaticProvider struct + func (s *StaticProvider) IsExpired() bool + func (s *StaticProvider) Retrieve() (Value, error) + type Value struct + AccessKeyID string + SecretAccessKey string + SessionToken string