awsfactory

package
v1.6.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LocalstackEndpoint = "http://localhost:4566" // LocalstackEndpoint is the default location for localstack
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSFactory

type AWSFactory interface {
	GetCfg() aws.Config
	GetDynamoDBClient() *dynamodb.Client
	GetS3Client() *s3.Client
	GetSNSClient() *sns.Client
	GetSQSClient() *sqs.Client
}

func ContextualAWSFactory added in v1.6.13

func ContextualAWSFactory(ctx context.Context) (AWSFactory, error)

func LocalstackAWSFactory added in v1.6.13

func LocalstackAWSFactory(ctx context.Context, endpoint string) (AWSFactory, error)

func StaticAWSFactory added in v1.6.13

func StaticAWSFactory(ctx context.Context, config StaticCredentials) (AWSFactory, error)

type ClientsFactory added in v1.6.13

type ClientsFactory struct {
	Cfg aws.Config
}

func (*ClientsFactory) GetCfg added in v1.6.13

func (d *ClientsFactory) GetCfg() aws.Config

func (*ClientsFactory) GetDynamoDBClient added in v1.6.13

func (d *ClientsFactory) GetDynamoDBClient() *dynamodb.Client

GetDynamoDBClient returns a singleton instance of a DynamoDB client

func (*ClientsFactory) GetS3Client added in v1.6.13

func (d *ClientsFactory) GetS3Client() *s3.Client

func (*ClientsFactory) GetSNSClient added in v1.6.13

func (d *ClientsFactory) GetSNSClient() *sns.Client

func (*ClientsFactory) GetSQSClient added in v1.6.13

func (d *ClientsFactory) GetSQSClient() *sqs.Client

type LocalstackClientsFactory added in v1.6.13

type LocalstackClientsFactory struct {
	ClientsFactory
}

func (*LocalstackClientsFactory) GetS3Client added in v1.6.13

func (d *LocalstackClientsFactory) GetS3Client() *s3.Client

type SecretAccessKeyDecoder

type SecretAccessKeyDecoder func(encodedValue string) (string, error)

type StaticCredentials added in v1.6.13

type StaticCredentials struct {
	Region          string
	AccessKeyID     string
	SecretAccessKey string
}

type TerraformOutput

type TerraformOutput struct {
	StaticCredentials
	DynamoDBName           string
	ArchiveMainBucketName  string
	ArchiveCacheBucketName string
	ArchiveJobsSNSARN      string
	ArchiveJobsSQSURL      string
}

TerraformOutput is the content of `infra-data` output and can be used as Names and as ConfigFactory.

func ReadTerraformOutputFile

func ReadTerraformOutputFile(ctx context.Context, outputFile string) (*TerraformOutput, error)

ReadTerraformOutputFile read the `terraform output -json` file as base to configure the application.

func (*TerraformOutput) DynamoDBMainTable

func (t *TerraformOutput) DynamoDBMainTable() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL