runner

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupSentry

func SetupSentry(sentryDSN, env string) (func(), error)

Types

type Config

type Config struct {
	SentryDSN string `required:"true" envconfig:"sentry_dsn"`
	SentryEnv string `required:"true" envconfig:"sentry_env"`

	TFETokenSecretARN string `required:"true" envconfig:"tfe_token_secret_arn"`
	TFEHostname       string `required:"true" envconfig:"tfe_hostname"`

	KMSKeyARN string `required:"true" envconfig:"kms_key_arn"`
	S3Prefix  string `required:"true" envconfig:"s3_prefix"`
	S3Bucket  string `required:"true" envconfig:"s3_bucket"`
}

type DataKey

type DataKey struct {
	Plaintext  string
	Ciphertext string
}

func GenerateDataKey

func GenerateDataKey(
	ctx context.Context,
	k kmsiface.KMSAPI,
	kmsKeyARN string,
) (*DataKey, error)

Generates a Data key from an AWS KMS key we can use to encrypt our backups

type TFE

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

func (*TFE) Backup

func (t *TFE) Backup(
	ctx context.Context,
	s3 s3manageriface.UploaderAPI,
	dataKey *DataKey,
	config *Config,
) error

type TFEiface

type TFEiface interface {
	Backup(context.Context, s3manageriface.UploaderAPI, *DataKey, *Config) error
}

func NewTFE

func NewTFE(token, host string) TFEiface

Jump to

Keyboard shortcuts

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