Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
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
Healthcheck checks whether the S3 bucket exists or not.