Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CredentialProvider ¶
type CredentialProvider interface {
Retrieve(ctx context.Context) (aws.Credentials, error)
Type() ProviderType
}
CredentialProvider provides an interface for retrieving AWS credentials.
func NewCredentialProvider ¶
func NewCredentialProvider(ctx context.Context, opts Options, configOpts []func(*config.LoadOptions) error) (CredentialProvider, error, )
type Options ¶
type Options struct {
Logger logger.Logger
Properties map[string]string
Region string `json:"region" mapstructure:"region" mapstructurealiases:"awsRegion"`
AccessKey string `json:"accessKey" mapstructure:"accessKey"`
SecretKey string `json:"secretKey" mapstructure:"secretKey"`
SessionToken string `json:"sessionToken" mapstructure:"sessionToken"`
AssumeRoleArn string `json:"assumeRoleArn" mapstructure:"assumeRoleArn"`
AssumeRoleSessionName string `json:"assumeRoleSessionName" mapstructure:"assumeRoleSessionName"`
TrustAnchorArn string `json:"trustAnchorArn" mapstructure:"trustAnchorArn"`
TrustProfileArn string `json:"trustProfileArn" mapstructure:"trustProfileArn"`
Endpoint string `json:"endpoint" mapstructure:"endpoint"`
}
type ProviderType ¶
type ProviderType int
const ( StaticProviderTypeStatic ProviderType = iota StaticProviderTypeAssumeRole X509ProviderType ProviderTypeUnknown // Or default )
type Static ¶
type Static struct {
ProviderType ProviderType
Logger logger.Logger
AccessKey string
SecretKey string
SessionToken string
Region string
Endpoint string
AssumeRoleArn string
AssumeRoleSessionName string
CredentialProvider aws.CredentialsProvider
}
func (*Static) Type ¶
func (a *Static) Type() ProviderType
Click to show internal directories.
Click to hide internal directories.