Documentation
¶
Index ¶
- func ConfigurePostgresIAM(ctx context.Context, poolConfig *pgxpool.Config, opts awsAuth.Options) error
- func NewConfig(ctx context.Context, authOptions auth.Options, opts ...ConfigOption) (aws.Config, error)
- func NewKinesisWorkerConfig(cfg aws.Config, stream, consumer, mode string) (*config.KinesisClientLibConfiguration, error)
- func StreamARN(ctx context.Context, client *kinesis.Client, streamName string) (*string, error)
- func WithCredentialProvider(provider aws.CredentialsProvider) func(*ConfigOptions)
- func WithHTTPClient(client *http.Client) func(*ConfigOptions)
- type ConfigLoadOptions
- type ConfigOption
- type ConfigOptions
- type DeprecatedPostgresIAM
- type DynamoDBClient
- type ParameterStoreClient
- type SecretsManagerClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigurePostgresIAM ¶ added in v1.17.0
func ConfigurePostgresIAM(ctx context.Context, poolConfig *pgxpool.Config, opts awsAuth.Options) error
ConfigurePostgresIAM mutates a pgxpool.Config so that it will obtain temporary credentials from AWS IAM each time a new connection is opened.
func NewKinesisWorkerConfig ¶ added in v1.17.0
func NewKinesisWorkerConfig(cfg aws.Config, stream, consumer, mode string) (*config.KinesisClientLibConfiguration, error)
NewKinesisWorkerConfig builds a KCL configuration object configured for the supplied stream, consumer and region. It converts the credentials contained in the aws.Config into a form that the KCL library can understand. The function returns an error if the consumer mode is unsupported or the provided AWS configuration is missing required information such as region.
func WithCredentialProvider ¶
func WithCredentialProvider(provider aws.CredentialsProvider) func(*ConfigOptions)
WithCredentialProvider allows for passing a custom credential provider, this is not cached - wrap the credential provider with a NewCredentialCache if you wish.
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) func(*ConfigOptions)
Types ¶
type ConfigLoadOptions ¶
type ConfigLoadOptions []func(*config.LoadOptions) error
type ConfigOption ¶
type ConfigOption func(*ConfigOptions)
type ConfigOptions ¶
type ConfigOptions struct {
CredentialProvider aws.CredentialsProvider
HTTPClient *http.Client
}
type DeprecatedPostgresIAM ¶ added in v1.17.0
type DeprecatedPostgresIAM struct {
// Access key to use for accessing PostgreSQL.
AccessKey string `json:"awsAccessKey" mapstructure:"awsAccessKey"`
// Secret key to use for accessing PostgreSQL.
SecretKey string `json:"awsSecretKey" mapstructure:"awsSecretKey"`
}
DeprecatedPostgresIAM contains legacy aws IAM fields used by PostgreSQL components. This is retained here to avoid breaking existing metadata parsing logic.
NOTE: this type is kept for backwards compatibility and may be removed in a future release at any time from 1.17 onwards once all consumers have migrated.
type DynamoDBClient ¶ added in v1.17.0
type DynamoDBClient interface {
GetItem(ctx context.Context, params *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)
PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
DeleteItem(ctx context.Context, params *dynamodb.DeleteItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error)
TransactWriteItems(ctx context.Context, params *dynamodb.TransactWriteItemsInput, optFns ...func(*dynamodb.Options)) (*dynamodb.TransactWriteItemsOutput, error)
}
type ParameterStoreClient ¶ added in v1.17.0
type ParameterStoreClient interface {
GetParameter(ctx context.Context, params *ssm.GetParameterInput, optFns ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
DescribeParameters(ctx context.Context, params *ssm.DescribeParametersInput, optFns ...func(*ssm.Options)) (*ssm.DescribeParametersOutput, error)
}
type SecretsManagerClient ¶ added in v1.17.0
type SecretsManagerClient interface {
GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error)
ListSecrets(ctx context.Context, params *secretsmanager.ListSecretsInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.ListSecretsOutput, error)
}