Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSInfraProviderer ¶
type AWSInfraProviderer interface {
CreateVPC(stack awscdk.Stack) awsec2.IVpc
NewStack(scope awscdk.App, id string, props *awscdk.StackProps) awscdk.Stack
SynthTemplate(app awscdk.App) (string, error)
GetCloudFormationClient() CloudFormationAPIer
}
AWSInfraProvider defines the interface for AWS infrastructure operations
type AWSProviderer ¶
type AWSProviderer interface {
CreateDeployment(ctx context.Context) error
ListDeployments(ctx context.Context) ([]string, error)
TerminateDeployment(ctx context.Context) error
GetLatestUbuntuImage(ctx context.Context, region string) (*types.Image, error)
GetEC2Client() (EC2Clienter, error)
SetEC2Client(client EC2Clienter)
Destroy(ctx context.Context) error
GetVMExternalIP(ctx context.Context, instanceID string) (string, error)
ValidateMachineType(ctx context.Context, location, instanceType string) (bool, error)
CreateVPCAndSubnet(ctx context.Context) error
StartResourcePolling(ctx context.Context) error
}
type CDKStackProviderer ¶
type CDKStackProviderer interface {
NewStack(scope awscdk.App, id string, props *awscdk.StackProps) awscdk.Stack
GetTemplate(stack awscdk.Stack) (string, error)
}
CDKStackProvider defines the interface for CDK stack operations
type CloudFormationAPIer ¶
type CloudFormationAPIer interface {
GetTemplate(
ctx context.Context,
params *cloudformation.GetTemplateInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.GetTemplateOutput, error)
DescribeStacks(
ctx context.Context,
params *cloudformation.DescribeStacksInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.DescribeStacksOutput, error)
DescribeStackEvents(
ctx context.Context,
params *cloudformation.DescribeStackEventsInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.DescribeStackEventsOutput, error)
CreateStack(
ctx context.Context,
params *cloudformation.CreateStackInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.CreateStackOutput, error)
UpdateStack(
ctx context.Context,
params *cloudformation.UpdateStackInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.UpdateStackOutput, error)
DeleteStack(
ctx context.Context,
params *cloudformation.DeleteStackInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.DeleteStackOutput, error)
ListStacks(
ctx context.Context,
params *cloudformation.ListStacksInput,
opts ...func(*cloudformation.Options),
) (*cloudformation.ListStacksOutput, error)
}
CloudFormationAPI represents the AWS CloudFormation operations
type EC2Clienter ¶
type EC2Clienter interface {
RunInstances(
ctx context.Context,
params *ec2.RunInstancesInput,
optFns ...func(*ec2.Options),
) (*ec2.RunInstancesOutput, error)
DescribeInstances(
ctx context.Context,
params *ec2.DescribeInstancesInput,
optFns ...func(*ec2.Options),
) (*ec2.DescribeInstancesOutput, error)
TerminateInstances(
ctx context.Context,
params *ec2.TerminateInstancesInput,
optFns ...func(*ec2.Options),
) (*ec2.TerminateInstancesOutput, error)
DescribeImages(
ctx context.Context,
params *ec2.DescribeImagesInput,
optFns ...func(*ec2.Options),
) (*ec2.DescribeImagesOutput, error)
CreateSubnet(
ctx context.Context,
params *ec2.CreateSubnetInput,
optFns ...func(*ec2.Options),
) (*ec2.CreateSubnetOutput, error)
CreateVPC(
ctx context.Context,
params *ec2.CreateVpcInput,
optFns ...func(*ec2.Options),
) (*ec2.CreateVpcOutput, error)
DescribeVPCs(
ctx context.Context,
params *ec2.DescribeVpcsInput,
optFns ...func(*ec2.Options),
) (*ec2.DescribeVpcsOutput, error)
CreateInternetGateway(
ctx context.Context,
params *ec2.CreateInternetGatewayInput,
optFns ...func(*ec2.Options),
) (*ec2.CreateInternetGatewayOutput, error)
AttachInternetGateway(
ctx context.Context,
params *ec2.AttachInternetGatewayInput,
optFns ...func(*ec2.Options),
) (*ec2.AttachInternetGatewayOutput, error)
CreateRouteTable(
ctx context.Context,
params *ec2.CreateRouteTableInput,
optFns ...func(*ec2.Options),
) (*ec2.CreateRouteTableOutput, error)
CreateRoute(
ctx context.Context,
params *ec2.CreateRouteInput,
optFns ...func(*ec2.Options),
) (*ec2.CreateRouteOutput, error)
AssociateRouteTable(
ctx context.Context,
params *ec2.AssociateRouteTableInput,
optFns ...func(*ec2.Options),
) (*ec2.AssociateRouteTableOutput, error)
}
Click to show internal directories.
Click to hide internal directories.