outboundAdapters

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotExists is returned when the key is not present in the object storage.
	ErrKeyNotExists = errors.New("key is not present in bucket")
)

Functions

This section is empty.

Types

type DynamoDBAdapter

type DynamoDBAdapter struct {
	Client *dynamodb.Client
	// contains filtered or unexported fields
}

func CreateDynamoDBAdapter

func CreateDynamoDBAdapter() *DynamoDBAdapter

CreateDynamoDBAdapter creates 2 separate dynamoDB clients - one for healthcheck and another for general usage. These 2 dynamoDB clients are then used to construct a DynamoDBAdapter instance. Returns the DynamoDBAdapter instance.

func (*DynamoDBAdapter) DeleteLockFile

func (d *DynamoDBAdapter) DeleteLockFile(ctx context.Context, projectName, clusterId string, keyFormat string) error

DeleteLockFile deletes terraform state lock file (related to the given cluster), from DynamoDB.

func (*DynamoDBAdapter) Healthcheck

func (d *DynamoDBAdapter) Healthcheck() error

Healthcheck function checks whether the DynamoDB table for Terraform state locking exists or not.

type S3Adapter added in v0.7.0

type S3Adapter struct {
	// contains filtered or unexported fields
}

func CreateS3Adapter added in v0.7.0

func CreateS3Adapter() *S3Adapter

CreateS3Adapter creates 2 s3 clients first - one for healthcheck and one for general purpose. A S3Adapter instance is then constructed using those 2 clients and returned. S3Adapter implements StateStoragePort interface

func (*S3Adapter) DeleteStateFile added in v0.7.0

func (s *S3Adapter) DeleteStateFile(ctx context.Context, projectName, clusterId string, keyFormat string) error

DeleteStateFile deletes terraform state file (related to the given cluster), from S3 bucket.

func (*S3Adapter) Healthcheck added in v0.7.0

func (s *S3Adapter) Healthcheck() error

Healthcheck checks whether the S3 bucket exists or not.

func (*S3Adapter) Stat added in v0.7.0

func (s *S3Adapter) Stat(ctx context.Context, projectName, clusterId, keyFormat string) error

Stat checks whether the given object exists in storage.

Jump to

Keyboard shortcuts

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