Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Coalesce(values ...string) string
 - func GetConfig(opts Options) *aws.Config
 - func GetConfigV2(accessKey string, secretKey string, sessionToken string, region string, ...) (awsv2.Config, error)
 - type Clients
 - type DeprecatedKafkaIAM
 - type DeprecatedPostgresIAM
 - type DynamoDBClients
 - type EnvironmentSettings
 - type KafkaClients
 - type KafkaOptions
 - type KinesisClients
 - type MockDynamoDB
 - func (m *MockDynamoDB) BatchWriteItemWithContext(ctx context.Context, input *dynamodb.BatchWriteItemInput, op ...request.Option) (*dynamodb.BatchWriteItemOutput, error)
 - func (m *MockDynamoDB) DeleteItemWithContext(ctx context.Context, input *dynamodb.DeleteItemInput, op ...request.Option) (*dynamodb.DeleteItemOutput, error)
 - func (m *MockDynamoDB) GetItemWithContext(ctx context.Context, input *dynamodb.GetItemInput, op ...request.Option) (*dynamodb.GetItemOutput, error)
 - func (m *MockDynamoDB) PutItemWithContext(ctx context.Context, input *dynamodb.PutItemInput, op ...request.Option) (*dynamodb.PutItemOutput, error)
 - func (m *MockDynamoDB) TransactWriteItemsWithContext(ctx context.Context, input *dynamodb.TransactWriteItemsInput, ...) (*dynamodb.TransactWriteItemsOutput, error)
 
- type MockParameterStore
 - func (m *MockParameterStore) DescribeParametersWithContext(ctx context.Context, input *ssm.DescribeParametersInput, ...) (*ssm.DescribeParametersOutput, error)
 - func (m *MockParameterStore) GetParameterWithContext(ctx context.Context, input *ssm.GetParameterInput, option ...request.Option) (*ssm.GetParameterOutput, error)
 
- type MockSecretManager
 - type Options
 - type ParameterStoreClients
 - type Provider
 - type S3Clients
 - type SecretManagerClients
 - type SesClients
 - type SnsClients
 - type SnsSqsClients
 - type SqsClients
 - type StaticAuth
 - func (a *StaticAuth) Close() error
 - func (a *StaticAuth) DynamoDB() *DynamoDBClients
 - func (a *StaticAuth) Kafka(opts KafkaOptions) (*KafkaClients, error)
 - func (a *StaticAuth) Kinesis() *KinesisClients
 - func (a *StaticAuth) ParameterStore() *ParameterStoreClients
 - func (a *StaticAuth) S3() *S3Clients
 - func (a *StaticAuth) SecretManager() *SecretManagerClients
 - func (a *StaticAuth) Ses() *SesClients
 - func (a *StaticAuth) Sns() *SnsClients
 - func (a *StaticAuth) SnsSqs() *SnsSqsClients
 - func (a *StaticAuth) Sqs() *SqsClients
 - func (a *StaticAuth) UpdatePostgres(ctx context.Context, poolConfig *pgxpool.Config)
 - func (a *StaticAuth) WithMockClients(clients *Clients)
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clients ¶ added in v1.15.0
type Clients struct {
	Dynamo *DynamoDBClients
	Secret         *SecretManagerClients
	ParameterStore *ParameterStoreClients
	// contains filtered or unexported fields
}
    type DeprecatedKafkaIAM ¶ added in v1.15.0
type DeprecatedKafkaIAM struct {
	Region         string `json:"awsRegion" mapstructure:"awsRegion"`
	AccessKey      string `json:"awsAccessKey" mapstructure:"awsAccessKey"`
	SecretKey      string `json:"awsSecretKey" mapstructure:"awsSecretKey"`
	SessionToken   string `json:"awsSessionToken" mapstructure:"awsSessionToken"`
	IamRoleArn     string `json:"awsIamRoleArn" mapstructure:"awsIamRoleArn"`
	StsSessionName string `json:"awsStsSessionName" mapstructure:"awsStsSessionName"`
}
    TODO: Delete in Dapr 1.17 so we can move all IAM fields to use the defaults of: accessKey and secretKey and region as noted in the docs, and Options struct above.
type DeprecatedPostgresIAM ¶ added in v1.15.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"`
}
    TODO: Delete in Dapr 1.17 so we can move all IAM fields to use the defaults of: accessKey and secretKey and region as noted in the docs, and Options struct above.
type DynamoDBClients ¶ added in v1.15.0
type DynamoDBClients struct {
	DynamoDB dynamodbiface.DynamoDBAPI
}
    func (*DynamoDBClients) New ¶ added in v1.15.0
func (c *DynamoDBClients) New(session *session.Session)
type EnvironmentSettings ¶ added in v1.14.0
func NewEnvironmentSettings ¶ added in v1.14.0
func NewEnvironmentSettings(md map[string]string) (EnvironmentSettings, error)
NewEnvironmentSettings returns a new EnvironmentSettings configured for a given AWS resource.
type KafkaClients ¶ added in v1.15.0
type KafkaClients struct {
	ConsumerGroup sarama.ConsumerGroup
	Producer      sarama.SyncProducer
	// contains filtered or unexported fields
}
    type KafkaOptions ¶ added in v1.15.0
type KinesisClients ¶ added in v1.15.0
type KinesisClients struct {
	Kinesis     kinesisiface.KinesisAPI
	Region      string
	Credentials *credentials.Credentials
}
    func (*KinesisClients) New ¶ added in v1.15.0
func (c *KinesisClients) New(session *session.Session)
func (*KinesisClients) WorkerCfg ¶ added in v1.15.0
func (c *KinesisClients) WorkerCfg(ctx context.Context, stream, consumer, mode string) *config.KinesisClientLibConfiguration
type MockDynamoDB ¶ added in v1.15.0
type MockDynamoDB struct {
	GetItemWithContextFn            func(ctx context.Context, input *dynamodb.GetItemInput, op ...request.Option) (*dynamodb.GetItemOutput, error)
	PutItemWithContextFn            func(ctx context.Context, input *dynamodb.PutItemInput, op ...request.Option) (*dynamodb.PutItemOutput, error)
	DeleteItemWithContextFn         func(ctx context.Context, input *dynamodb.DeleteItemInput, op ...request.Option) (*dynamodb.DeleteItemOutput, error)
	BatchWriteItemWithContextFn     func(ctx context.Context, input *dynamodb.BatchWriteItemInput, op ...request.Option) (*dynamodb.BatchWriteItemOutput, error)
	TransactWriteItemsWithContextFn func(aws.Context, *dynamodb.TransactWriteItemsInput, ...request.Option) (*dynamodb.TransactWriteItemsOutput, error)
	dynamodbiface.DynamoDBAPI
}
    func (*MockDynamoDB) BatchWriteItemWithContext ¶ added in v1.15.0
func (m *MockDynamoDB) BatchWriteItemWithContext(ctx context.Context, input *dynamodb.BatchWriteItemInput, op ...request.Option) (*dynamodb.BatchWriteItemOutput, error)
func (*MockDynamoDB) DeleteItemWithContext ¶ added in v1.15.0
func (m *MockDynamoDB) DeleteItemWithContext(ctx context.Context, input *dynamodb.DeleteItemInput, op ...request.Option) (*dynamodb.DeleteItemOutput, error)
func (*MockDynamoDB) GetItemWithContext ¶ added in v1.15.0
func (m *MockDynamoDB) GetItemWithContext(ctx context.Context, input *dynamodb.GetItemInput, op ...request.Option) (*dynamodb.GetItemOutput, error)
func (*MockDynamoDB) PutItemWithContext ¶ added in v1.15.0
func (m *MockDynamoDB) PutItemWithContext(ctx context.Context, input *dynamodb.PutItemInput, op ...request.Option) (*dynamodb.PutItemOutput, error)
func (*MockDynamoDB) TransactWriteItemsWithContext ¶ added in v1.15.0
func (m *MockDynamoDB) TransactWriteItemsWithContext(ctx context.Context, input *dynamodb.TransactWriteItemsInput, op ...request.Option) (*dynamodb.TransactWriteItemsOutput, error)
type MockParameterStore ¶ added in v1.15.0
type MockParameterStore struct {
	GetParameterFn       func(context.Context, *ssm.GetParameterInput, ...request.Option) (*ssm.GetParameterOutput, error)
	DescribeParametersFn func(context.Context, *ssm.DescribeParametersInput, ...request.Option) (*ssm.DescribeParametersOutput, error)
	ssmiface.SSMAPI
}
    func (*MockParameterStore) DescribeParametersWithContext ¶ added in v1.15.0
func (m *MockParameterStore) DescribeParametersWithContext(ctx context.Context, input *ssm.DescribeParametersInput, option ...request.Option) (*ssm.DescribeParametersOutput, error)
func (*MockParameterStore) GetParameterWithContext ¶ added in v1.15.0
func (m *MockParameterStore) GetParameterWithContext(ctx context.Context, input *ssm.GetParameterInput, option ...request.Option) (*ssm.GetParameterOutput, error)
type MockSecretManager ¶ added in v1.15.0
type MockSecretManager struct {
	GetSecretValueFn func(context.Context, *secretsmanager.GetSecretValueInput, ...request.Option) (*secretsmanager.GetSecretValueOutput, error)
	secretsmanageriface.SecretsManagerAPI
}
    func (*MockSecretManager) GetSecretValueWithContext ¶ added in v1.15.0
func (m *MockSecretManager) GetSecretValueWithContext(ctx context.Context, input *secretsmanager.GetSecretValueInput, option ...request.Option) (*secretsmanager.GetSecretValueOutput, error)
type Options ¶ added in v1.15.0
type Options struct {
	Logger     logger.Logger
	Properties map[string]string
	PoolConfig       *pgxpool.Config `json:"poolConfig" mapstructure:"poolConfig"`
	ConnectionString string          `json:"connectionString" mapstructure:"connectionString"`
	// TODO: in Dapr 1.17 rm the alias on regions as we rm the aws prefixed one.
	// Docs have it just as region, but most metadata fields show the aws prefix...
	Region        string `json:"region" mapstructure:"region" mapstructurealiases:"awsRegion"`
	AccessKey     string `json:"accessKey" mapstructure:"accessKey"`
	SecretKey     string `json:"secretKey" mapstructure:"secretKey"`
	SessionName   string `json:"sessionName" mapstructure:"sessionName"`
	AssumeRoleARN string `json:"assumeRoleArn" mapstructure:"assumeRoleArn"`
	SessionToken  string `json:"sessionToken" mapstructure:"sessionToken"`
	Endpoint string
}
    type ParameterStoreClients ¶ added in v1.15.0
func (*ParameterStoreClients) New ¶ added in v1.15.0
func (c *ParameterStoreClients) New(session *session.Session)
type Provider ¶ added in v1.15.0
type Provider interface {
	S3() *S3Clients
	DynamoDB() *DynamoDBClients
	Sqs() *SqsClients
	Sns() *SnsClients
	SnsSqs() *SnsSqsClients
	SecretManager() *SecretManagerClients
	ParameterStore() *ParameterStoreClients
	Kinesis() *KinesisClients
	Ses() *SesClients
	Kafka(KafkaOptions) (*KafkaClients, error)
	// Postgres is an outlier to the others in the sense that we can update only it's config,
	// as we use a max connection time of 8 minutes.
	// This means that we can just update the config session credentials,
	// and then in 8 minutes it will update to a new session automatically for us.
	UpdatePostgres(context.Context, *pgxpool.Config)
	Close() error
}
    type SecretManagerClients ¶ added in v1.15.0
type SecretManagerClients struct {
	Manager secretsmanageriface.SecretsManagerAPI
}
    func (*SecretManagerClients) New ¶ added in v1.15.0
func (c *SecretManagerClients) New(session *session.Session)
type SesClients ¶ added in v1.15.0
func (*SesClients) New ¶ added in v1.15.0
func (c *SesClients) New(session *session.Session)
type SnsClients ¶ added in v1.15.0
func (*SnsClients) New ¶ added in v1.15.0
func (c *SnsClients) New(session *session.Session)
type SnsSqsClients ¶ added in v1.15.0
func (*SnsSqsClients) New ¶ added in v1.15.0
func (c *SnsSqsClients) New(session *session.Session)
type SqsClients ¶ added in v1.15.0
func (*SqsClients) New ¶ added in v1.15.0
func (c *SqsClients) New(session *session.Session)
type StaticAuth ¶ added in v1.15.0
type StaticAuth struct {
	// contains filtered or unexported fields
}
    func (*StaticAuth) Close ¶ added in v1.15.0
func (a *StaticAuth) Close() error
func (*StaticAuth) DynamoDB ¶ added in v1.15.0
func (a *StaticAuth) DynamoDB() *DynamoDBClients
func (*StaticAuth) Kafka ¶ added in v1.15.0
func (a *StaticAuth) Kafka(opts KafkaOptions) (*KafkaClients, error)
func (*StaticAuth) Kinesis ¶ added in v1.15.0
func (a *StaticAuth) Kinesis() *KinesisClients
func (*StaticAuth) ParameterStore ¶ added in v1.15.0
func (a *StaticAuth) ParameterStore() *ParameterStoreClients
func (*StaticAuth) S3 ¶ added in v1.15.0
func (a *StaticAuth) S3() *S3Clients
func (*StaticAuth) SecretManager ¶ added in v1.15.0
func (a *StaticAuth) SecretManager() *SecretManagerClients
func (*StaticAuth) Ses ¶ added in v1.15.0
func (a *StaticAuth) Ses() *SesClients
func (*StaticAuth) Sns ¶ added in v1.15.0
func (a *StaticAuth) Sns() *SnsClients
func (*StaticAuth) SnsSqs ¶ added in v1.15.0
func (a *StaticAuth) SnsSqs() *SnsSqsClients
func (*StaticAuth) Sqs ¶ added in v1.15.0
func (a *StaticAuth) Sqs() *SqsClients
func (*StaticAuth) UpdatePostgres ¶ added in v1.15.0
func (a *StaticAuth) UpdatePostgres(ctx context.Context, poolConfig *pgxpool.Config)
func (*StaticAuth) WithMockClients ¶ added in v1.15.0
func (a *StaticAuth) WithMockClients(clients *Clients)
This is to be used only for test purposes to inject mocked clients
 Click to show internal directories. 
   Click to hide internal directories.