aws

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSBackendOption

type AWSBackendOption func(*Backend)

func WithAWSProfile

func WithAWSProfile(profile string) AWSBackendOption

WithAWSProfile sets the AWS profile to use for this Backend

func WithAWSRegion

func WithAWSRegion(region string) AWSBackendOption

WithAWSRegion sets the AWS region for this Backend

func WithAWSSession

func WithAWSSession(session *session.Session) AWSBackendOption

WithAWSSession allows configuring an AWS Session

func WithEC2Client

func WithEC2Client(client ec2iface.EC2API) AWSBackendOption

WithEC2Client allows overriding the AWS EC2 Client

func WithECRClient

func WithECRClient(client ecriface.ECRAPI) AWSBackendOption

WithECRClient allows overriding the AWS ECR Client

func WithECSClient

func WithECSClient(client ecsiface.ECSAPI) AWSBackendOption

WithECSClient allows overriding the AWS ECS Client

func WithIntegrationSecret

func WithIntegrationSecret(integrationSecret *config.IntegrationSecret) AWSBackendOption

WithIntegrationSecret sets the IntegrationSecret for this Backend

func WithLogsClient

WithLogsClient allows overriding the AWS Logs Client

func WithSSMClient

func WithSSMClient(client ssmiface.SSMAPI) AWSBackendOption

WithSSMClient allows overriding the AWS SSM Client

func WithSTSClient

func WithSTSClient(client stsiface.STSAPI) AWSBackendOption

WithSTSClients allows overriding the AWS STS Client

func WithSecretsClient

func WithSecretsClient(client secretsmanageriface.SecretsManagerAPI) AWSBackendOption

WithSecretsClient allows overriding the AWS Secrets Client

type Backend

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

func NewAWSBackend

func NewAWSBackend(
	ctx context.Context,
	happyConfig *config.HappyConfig,
	opts ...AWSBackendOption) (*Backend, error)

New returns a new AWS backend

func (*Backend) Conf

func (b *Backend) Conf() *instantiatedConfig

func (*Backend) ECRGetAuthorizationToken

func (b *Backend) ECRGetAuthorizationToken(ctx context.Context) (*ECRAuthorizationToken, error)

NOTE: we just need one token to access al ECRs this principal has access to

func (*Backend) GenerateTag

func (b *Backend) GenerateTag(ctx context.Context) (string, error)

func (*Backend) GetEC2Client

func (b *Backend) GetEC2Client() ec2iface.EC2API

func (*Backend) GetECRClient

func (b *Backend) GetECRClient() ecriface.ECRAPI

func (*Backend) GetECSClient

func (b *Backend) GetECSClient() ecsiface.ECSAPI

func (*Backend) GetParam

func (ab *Backend) GetParam(ctx context.Context, path string) (string, error)

TODO: we should already have the path prefix here

func (*Backend) GetUserName

func (b *Backend) GetUserName(ctx context.Context) (string, error)

GetUserName will attempt to derive the caller's username

func (*Backend) RunTask

func (b *Backend) RunTask(
	ctx context.Context,
	taskDefArn string,
	launchType config.LaunchType,
) error

func (*Backend) WriteParam

func (ab *Backend) WriteParam(
	ctx context.Context,
	name string,
	val string,
) error

type ECRAuthorizationToken

type ECRAuthorizationToken struct {
	Username      string
	Password      string
	ProxyEndpoint string
}

func (*ECRAuthorizationToken) DockerLogin

func (e *ECRAuthorizationToken) DockerLogin(ctx context.Context) error

type LogMessages

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

func (*LogMessages) Print

func (lm *LogMessages) Print()

type TaskType

type TaskType string
const (
	TaskTypeDelete  TaskType = "delete"
	TaskTypeMigrate TaskType = "migrate"
)

Directories

Path Synopsis
Package testbackend is a generated GoMock package.
Package testbackend is a generated GoMock package.

Jump to

Keyboard shortcuts

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