Versions in this module Expand all Collapse all v0 v0.1.0 Dec 26, 2023 v0.0.1 Dec 26, 2023 Changes in this version + const EnvProviderName + const SharedCredsProviderName + const StaticProviderName + var AnonymousCredentials = NewStaticCredentials("", "", "") + var ErrAccessKeyIDNotFound = awserr.New("EnvAccessKeyNotFound", ...) + var ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders", ..., nil) + var ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", ...) + var ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil) + var ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil) + type ChainProvider struct + Providers []Provider + VerboseErrors bool + func (c *ChainProvider) IsExpired() bool + func (c *ChainProvider) Retrieve() (Value, error) + type Context = context.Context + type Credentials struct + func NewChainCredentials(providers []Provider) *Credentials + func NewCredentials(provider Provider) *Credentials + func NewEnvCredentials() *Credentials + func NewSharedCredentials(filename, profile string) *Credentials + func NewStaticCredentials(id, secret, token string) *Credentials + func NewStaticCredentialsFromCreds(creds Value) *Credentials + func (c *Credentials) Expire() + func (c *Credentials) ExpiresAt() (time.Time, error) + func (c *Credentials) Get() (Value, error) + func (c *Credentials) GetWithContext(ctx Context) (Value, error) + func (c *Credentials) IsExpired() bool + type EnvProvider struct + func (e *EnvProvider) IsExpired() bool + func (e *EnvProvider) Retrieve() (Value, error) + type ErrorProvider struct + Err error + ProviderName string + func (p ErrorProvider) IsExpired() bool + func (p ErrorProvider) Retrieve() (Value, error) + type Expirer interface + ExpiresAt func() time.Time + type Expiry struct + CurrentTime func() time.Time + func (e *Expiry) ExpiresAt() time.Time + func (e *Expiry) IsExpired() bool + func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) + type Provider interface + IsExpired func() bool + Retrieve func() (Value, error) + type ProviderWithContext interface + RetrieveWithContext func(Context) (Value, error) + 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 + ProviderName string + SecretAccessKey string + SessionToken string + func (v Value) HasKeys() bool