ec2

package
v0.0.0-...-ea883c3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EBSEncryption

type EBSEncryption struct {
	Enabled bool `json:"enabled"`
	// contains filtered or unexported fields
}

func (EBSEncryption) GetRegion

func (e EBSEncryption) GetRegion() string

func (EBSEncryption) GetResourceArn

func (e EBSEncryption) GetResourceArn() string

func (EBSEncryption) GetResourceName

func (e EBSEncryption) GetResourceName() string

func (EBSEncryption) GetResourceType

func (e EBSEncryption) GetResourceType() string

type EBSSnapshot

type EBSSnapshot struct {
	Instance   Ec2Instance
	SnapshotId string
	State      types.SnapshotState
	Region     string

	VolumeSize  int
	IsEncrypted bool
	// contains filtered or unexported fields
}

func FromSnapshot

func FromSnapshot(snapshot types.Snapshot, region string, awsAccount string, ins Ec2Instance) EBSSnapshot

func FromSnapshotInfo

func FromSnapshotInfo(snapshot types.SnapshotInfo, region string, awsAccount string, ins Ec2Instance) EBSSnapshot

func (EBSSnapshot) GetResourceArn

func (e EBSSnapshot) GetResourceArn() string

func (EBSSnapshot) GetResourceName

func (e EBSSnapshot) GetResourceName() string

func (EBSSnapshot) GetResourceType

func (e EBSSnapshot) GetResourceType() string

type Ec2Instance

type Ec2Instance struct {
	types.Instance
	Region string

	RootVolume *Volume
	// contains filtered or unexported fields
}

func (Ec2Instance) GetResourceArn

func (i Ec2Instance) GetResourceArn() string

func (Ec2Instance) GetResourceId

func (i Ec2Instance) GetResourceId() string

func (Ec2Instance) GetResourceMacAddresses

func (i Ec2Instance) GetResourceMacAddresses() []string

TODO: Use genertic implementation with custom functions

func (Ec2Instance) GetResourceName

func (i Ec2Instance) GetResourceName() string

func (Ec2Instance) GetResourceSecurityGroups

func (i Ec2Instance) GetResourceSecurityGroups() []SecurityGroupInfo

TODO: Use genertic implementation with custom functions

func (Ec2Instance) GetResourceTags

func (i Ec2Instance) GetResourceTags() map[string]string

TODO: Use genertic implementation with custom functions

func (Ec2Instance) GetResourceType

func (i Ec2Instance) GetResourceType() string

type ElasticCompute

type ElasticCompute interface {
	DescribeNetworkAcl(ctx context.Context) ([]awslib.AwsResource, error)
	DescribeSecurityGroups(ctx context.Context) ([]awslib.AwsResource, error)
	DescribeVpcs(ctx context.Context) ([]awslib.AwsResource, error)
	GetEbsEncryptionByDefault(ctx context.Context) ([]awslib.AwsResource, error)
	GetRouteTableForSubnet(ctx context.Context, region string, subnetId string, vpcId string) (types.RouteTable, error)
}

type InternetGatewayInfo

type InternetGatewayInfo struct {
	InternetGateway types.InternetGateway `json:"internet_gateway"`
	// contains filtered or unexported fields
}

func (InternetGatewayInfo) GetRegion

func (v InternetGatewayInfo) GetRegion() string

func (InternetGatewayInfo) GetResourceArn

func (v InternetGatewayInfo) GetResourceArn() string

func (InternetGatewayInfo) GetResourceName

func (v InternetGatewayInfo) GetResourceName() string

func (InternetGatewayInfo) GetResourceType

func (v InternetGatewayInfo) GetResourceType() string

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) CreateSnapshots

func (_m *MockClient) CreateSnapshots(ctx context.Context, params *serviceec2.CreateSnapshotsInput, optFns ...func(*serviceec2.Options)) (*serviceec2.CreateSnapshotsOutput, error)

CreateSnapshots provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DeleteSnapshot

func (_m *MockClient) DeleteSnapshot(ctx context.Context, params *serviceec2.DeleteSnapshotInput, optFns ...func(*serviceec2.Options)) (*serviceec2.DeleteSnapshotOutput, error)

DeleteSnapshot provides a mock function with given fields: ctx, params, optFns

func (*MockClient) DescribeFlowLogs

DescribeFlowLogs provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeInstances

DescribeInstances provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeInternetGateways

DescribeInternetGateways provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeNatGateways

DescribeNatGateways provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeNetworkAcls

DescribeNetworkAcls provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeNetworkInterfaces

DescribeNetworkInterfaces provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeRouteTables

DescribeRouteTables provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeSecurityGroups

DescribeSecurityGroups provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeSnapshots

DescribeSnapshots provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeSubnets

DescribeSubnets provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeTransitGatewayAttachments

DescribeTransitGatewayAttachments provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeTransitGateways

DescribeTransitGateways provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeVolumes

DescribeVolumes provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeVpcPeeringConnections

DescribeVpcPeeringConnections provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) DescribeVpcs

DescribeVpcs provides a mock function with given fields: _a0, _a1, _a2

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) GetEbsEncryptionByDefault

GetEbsEncryptionByDefault provides a mock function with given fields: ctx, params, optFns

type MockClient_CreateSnapshots_Call

type MockClient_CreateSnapshots_Call struct {
	*mock.Call
}

MockClient_CreateSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSnapshots'

func (*MockClient_CreateSnapshots_Call) Return

func (*MockClient_CreateSnapshots_Call) Run

type MockClient_DeleteSnapshot_Call

type MockClient_DeleteSnapshot_Call struct {
	*mock.Call
}

MockClient_DeleteSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSnapshot'

func (*MockClient_DeleteSnapshot_Call) Return

func (*MockClient_DeleteSnapshot_Call) Run

type MockClient_DescribeFlowLogs_Call

type MockClient_DescribeFlowLogs_Call struct {
	*mock.Call
}

MockClient_DescribeFlowLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeFlowLogs'

func (*MockClient_DescribeFlowLogs_Call) Return

func (*MockClient_DescribeFlowLogs_Call) Run

type MockClient_DescribeInstances_Call

type MockClient_DescribeInstances_Call struct {
	*mock.Call
}

MockClient_DescribeInstances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeInstances'

func (*MockClient_DescribeInstances_Call) Return

func (*MockClient_DescribeInstances_Call) Run

type MockClient_DescribeInternetGateways_Call

type MockClient_DescribeInternetGateways_Call struct {
	*mock.Call
}

MockClient_DescribeInternetGateways_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeInternetGateways'

func (*MockClient_DescribeInternetGateways_Call) Run

type MockClient_DescribeNatGateways_Call

type MockClient_DescribeNatGateways_Call struct {
	*mock.Call
}

MockClient_DescribeNatGateways_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeNatGateways'

func (*MockClient_DescribeNatGateways_Call) Return

func (*MockClient_DescribeNatGateways_Call) Run

type MockClient_DescribeNetworkAcls_Call

type MockClient_DescribeNetworkAcls_Call struct {
	*mock.Call
}

MockClient_DescribeNetworkAcls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeNetworkAcls'

func (*MockClient_DescribeNetworkAcls_Call) Return

func (*MockClient_DescribeNetworkAcls_Call) Run

type MockClient_DescribeNetworkInterfaces_Call

type MockClient_DescribeNetworkInterfaces_Call struct {
	*mock.Call
}

MockClient_DescribeNetworkInterfaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeNetworkInterfaces'

func (*MockClient_DescribeNetworkInterfaces_Call) Run

type MockClient_DescribeRouteTables_Call

type MockClient_DescribeRouteTables_Call struct {
	*mock.Call
}

MockClient_DescribeRouteTables_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeRouteTables'

func (*MockClient_DescribeRouteTables_Call) Return

func (*MockClient_DescribeRouteTables_Call) Run

type MockClient_DescribeSecurityGroups_Call

type MockClient_DescribeSecurityGroups_Call struct {
	*mock.Call
}

MockClient_DescribeSecurityGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSecurityGroups'

func (*MockClient_DescribeSecurityGroups_Call) Return

func (*MockClient_DescribeSecurityGroups_Call) Run

type MockClient_DescribeSnapshots_Call

type MockClient_DescribeSnapshots_Call struct {
	*mock.Call
}

MockClient_DescribeSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSnapshots'

func (*MockClient_DescribeSnapshots_Call) Return

func (*MockClient_DescribeSnapshots_Call) Run

type MockClient_DescribeSubnets_Call

type MockClient_DescribeSubnets_Call struct {
	*mock.Call
}

MockClient_DescribeSubnets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSubnets'

func (*MockClient_DescribeSubnets_Call) Return

func (*MockClient_DescribeSubnets_Call) Run

type MockClient_DescribeTransitGatewayAttachments_Call

type MockClient_DescribeTransitGatewayAttachments_Call struct {
	*mock.Call
}

MockClient_DescribeTransitGatewayAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeTransitGatewayAttachments'

type MockClient_DescribeTransitGateways_Call

type MockClient_DescribeTransitGateways_Call struct {
	*mock.Call
}

MockClient_DescribeTransitGateways_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeTransitGateways'

func (*MockClient_DescribeTransitGateways_Call) Run

type MockClient_DescribeVolumes_Call

type MockClient_DescribeVolumes_Call struct {
	*mock.Call
}

MockClient_DescribeVolumes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVolumes'

func (*MockClient_DescribeVolumes_Call) Return

func (*MockClient_DescribeVolumes_Call) Run

type MockClient_DescribeVpcPeeringConnections_Call

type MockClient_DescribeVpcPeeringConnections_Call struct {
	*mock.Call
}

MockClient_DescribeVpcPeeringConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVpcPeeringConnections'

func (*MockClient_DescribeVpcPeeringConnections_Call) Run

type MockClient_DescribeVpcs_Call

type MockClient_DescribeVpcs_Call struct {
	*mock.Call
}

MockClient_DescribeVpcs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVpcs'

func (*MockClient_DescribeVpcs_Call) Return

func (*MockClient_DescribeVpcs_Call) Run

type MockClient_Expecter

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

func (*MockClient_Expecter) CreateSnapshots

func (_e *MockClient_Expecter) CreateSnapshots(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_CreateSnapshots_Call

CreateSnapshots is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.CreateSnapshotsInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DeleteSnapshot

func (_e *MockClient_Expecter) DeleteSnapshot(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_DeleteSnapshot_Call

DeleteSnapshot is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.DeleteSnapshotInput
  • optFns ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeFlowLogs

func (_e *MockClient_Expecter) DescribeFlowLogs(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeFlowLogs_Call

DescribeFlowLogs is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeFlowLogsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeInstances

func (_e *MockClient_Expecter) DescribeInstances(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeInstances_Call

DescribeInstances is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeInstancesInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeInternetGateways

func (_e *MockClient_Expecter) DescribeInternetGateways(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeInternetGateways_Call

DescribeInternetGateways is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeInternetGatewaysInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeNatGateways

func (_e *MockClient_Expecter) DescribeNatGateways(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeNatGateways_Call

DescribeNatGateways is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeNatGatewaysInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeNetworkAcls

func (_e *MockClient_Expecter) DescribeNetworkAcls(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeNetworkAcls_Call

DescribeNetworkAcls is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeNetworkAclsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeNetworkInterfaces

func (_e *MockClient_Expecter) DescribeNetworkInterfaces(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeNetworkInterfaces_Call

DescribeNetworkInterfaces is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeNetworkInterfacesInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeRouteTables

func (_e *MockClient_Expecter) DescribeRouteTables(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeRouteTables_Call

DescribeRouteTables is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeRouteTablesInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeSecurityGroups

func (_e *MockClient_Expecter) DescribeSecurityGroups(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeSecurityGroups_Call

DescribeSecurityGroups is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeSecurityGroupsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeSnapshots

func (_e *MockClient_Expecter) DescribeSnapshots(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeSnapshots_Call

DescribeSnapshots is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeSnapshotsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeSubnets

func (_e *MockClient_Expecter) DescribeSubnets(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeSubnets_Call

DescribeSubnets is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeSubnetsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeTransitGatewayAttachments

func (_e *MockClient_Expecter) DescribeTransitGatewayAttachments(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeTransitGatewayAttachments_Call

DescribeTransitGatewayAttachments is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeTransitGatewayAttachmentsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeTransitGateways

func (_e *MockClient_Expecter) DescribeTransitGateways(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeTransitGateways_Call

DescribeTransitGateways is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeTransitGatewaysInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeVolumes

func (_e *MockClient_Expecter) DescribeVolumes(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeVolumes_Call

DescribeVolumes is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeVolumesInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeVpcPeeringConnections

func (_e *MockClient_Expecter) DescribeVpcPeeringConnections(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeVpcPeeringConnections_Call

DescribeVpcPeeringConnections is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeVpcPeeringConnectionsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) DescribeVpcs

func (_e *MockClient_Expecter) DescribeVpcs(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockClient_DescribeVpcs_Call

DescribeVpcs is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *serviceec2.DescribeVpcsInput
  • _a2 ...func(*serviceec2.Options)

func (*MockClient_Expecter) GetEbsEncryptionByDefault

func (_e *MockClient_Expecter) GetEbsEncryptionByDefault(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetEbsEncryptionByDefault_Call

GetEbsEncryptionByDefault is a helper method to define mock.On call

  • ctx context.Context
  • params *serviceec2.GetEbsEncryptionByDefaultInput
  • optFns ...func(*serviceec2.Options)

type MockClient_GetEbsEncryptionByDefault_Call

type MockClient_GetEbsEncryptionByDefault_Call struct {
	*mock.Call
}

MockClient_GetEbsEncryptionByDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEbsEncryptionByDefault'

func (*MockClient_GetEbsEncryptionByDefault_Call) Run

type MockElasticCompute

type MockElasticCompute struct {
	mock.Mock
}

MockElasticCompute is an autogenerated mock type for the ElasticCompute type

func NewMockElasticCompute

func NewMockElasticCompute(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockElasticCompute

NewMockElasticCompute creates a new instance of MockElasticCompute. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockElasticCompute) DescribeNetworkAcl

func (_m *MockElasticCompute) DescribeNetworkAcl(ctx context.Context) ([]awslib.AwsResource, error)

DescribeNetworkAcl provides a mock function with given fields: ctx

func (*MockElasticCompute) DescribeSecurityGroups

func (_m *MockElasticCompute) DescribeSecurityGroups(ctx context.Context) ([]awslib.AwsResource, error)

DescribeSecurityGroups provides a mock function with given fields: ctx

func (*MockElasticCompute) DescribeVpcs

func (_m *MockElasticCompute) DescribeVpcs(ctx context.Context) ([]awslib.AwsResource, error)

DescribeVpcs provides a mock function with given fields: ctx

func (*MockElasticCompute) EXPECT

func (*MockElasticCompute) GetEbsEncryptionByDefault

func (_m *MockElasticCompute) GetEbsEncryptionByDefault(ctx context.Context) ([]awslib.AwsResource, error)

GetEbsEncryptionByDefault provides a mock function with given fields: ctx

func (*MockElasticCompute) GetRouteTableForSubnet

func (_m *MockElasticCompute) GetRouteTableForSubnet(ctx context.Context, region string, subnetId string, vpcId string) (types.RouteTable, error)

GetRouteTableForSubnet provides a mock function with given fields: ctx, region, subnetId, vpcId

type MockElasticCompute_DescribeNetworkAcl_Call

type MockElasticCompute_DescribeNetworkAcl_Call struct {
	*mock.Call
}

MockElasticCompute_DescribeNetworkAcl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeNetworkAcl'

func (*MockElasticCompute_DescribeNetworkAcl_Call) Return

func (*MockElasticCompute_DescribeNetworkAcl_Call) Run

func (*MockElasticCompute_DescribeNetworkAcl_Call) RunAndReturn

type MockElasticCompute_DescribeSecurityGroups_Call

type MockElasticCompute_DescribeSecurityGroups_Call struct {
	*mock.Call
}

MockElasticCompute_DescribeSecurityGroups_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeSecurityGroups'

func (*MockElasticCompute_DescribeSecurityGroups_Call) Return

func (*MockElasticCompute_DescribeSecurityGroups_Call) Run

func (*MockElasticCompute_DescribeSecurityGroups_Call) RunAndReturn

type MockElasticCompute_DescribeVpcs_Call

type MockElasticCompute_DescribeVpcs_Call struct {
	*mock.Call
}

MockElasticCompute_DescribeVpcs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeVpcs'

func (*MockElasticCompute_DescribeVpcs_Call) Return

func (*MockElasticCompute_DescribeVpcs_Call) Run

func (*MockElasticCompute_DescribeVpcs_Call) RunAndReturn

type MockElasticCompute_Expecter

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

func (*MockElasticCompute_Expecter) DescribeNetworkAcl

func (_e *MockElasticCompute_Expecter) DescribeNetworkAcl(ctx interface{}) *MockElasticCompute_DescribeNetworkAcl_Call

DescribeNetworkAcl is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) DescribeSecurityGroups

func (_e *MockElasticCompute_Expecter) DescribeSecurityGroups(ctx interface{}) *MockElasticCompute_DescribeSecurityGroups_Call

DescribeSecurityGroups is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) DescribeVpcs

func (_e *MockElasticCompute_Expecter) DescribeVpcs(ctx interface{}) *MockElasticCompute_DescribeVpcs_Call

DescribeVpcs is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) GetEbsEncryptionByDefault

func (_e *MockElasticCompute_Expecter) GetEbsEncryptionByDefault(ctx interface{}) *MockElasticCompute_GetEbsEncryptionByDefault_Call

GetEbsEncryptionByDefault is a helper method to define mock.On call

  • ctx context.Context

func (*MockElasticCompute_Expecter) GetRouteTableForSubnet

func (_e *MockElasticCompute_Expecter) GetRouteTableForSubnet(ctx interface{}, region interface{}, subnetId interface{}, vpcId interface{}) *MockElasticCompute_GetRouteTableForSubnet_Call

GetRouteTableForSubnet is a helper method to define mock.On call

  • ctx context.Context
  • region string
  • subnetId string
  • vpcId string

type MockElasticCompute_GetEbsEncryptionByDefault_Call

type MockElasticCompute_GetEbsEncryptionByDefault_Call struct {
	*mock.Call
}

MockElasticCompute_GetEbsEncryptionByDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEbsEncryptionByDefault'

func (*MockElasticCompute_GetEbsEncryptionByDefault_Call) Return

func (*MockElasticCompute_GetEbsEncryptionByDefault_Call) Run

func (*MockElasticCompute_GetEbsEncryptionByDefault_Call) RunAndReturn

type MockElasticCompute_GetRouteTableForSubnet_Call

type MockElasticCompute_GetRouteTableForSubnet_Call struct {
	*mock.Call
}

MockElasticCompute_GetRouteTableForSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRouteTableForSubnet'

func (*MockElasticCompute_GetRouteTableForSubnet_Call) Return

func (*MockElasticCompute_GetRouteTableForSubnet_Call) Run

func (*MockElasticCompute_GetRouteTableForSubnet_Call) RunAndReturn

type NACLInfo

type NACLInfo struct {
	types.NetworkAcl
	// contains filtered or unexported fields
}

func (NACLInfo) GetRegion

func (r NACLInfo) GetRegion() string

func (NACLInfo) GetResourceArn

func (r NACLInfo) GetResourceArn() string

func (NACLInfo) GetResourceName

func (r NACLInfo) GetResourceName() string

func (NACLInfo) GetResourceType

func (r NACLInfo) GetResourceType() string

type NatGatewayInfo

type NatGatewayInfo struct {
	NatGateway types.NatGateway `json:"nat_gateway"`
	// contains filtered or unexported fields
}

func (NatGatewayInfo) GetRegion

func (v NatGatewayInfo) GetRegion() string

func (NatGatewayInfo) GetResourceArn

func (v NatGatewayInfo) GetResourceArn() string

func (NatGatewayInfo) GetResourceName

func (v NatGatewayInfo) GetResourceName() string

func (NatGatewayInfo) GetResourceType

func (v NatGatewayInfo) GetResourceType() string

type NetworkInterfaceInfo

type NetworkInterfaceInfo struct {
	NetworkInterface types.NetworkInterface `json:"network_interface"`
	// contains filtered or unexported fields
}

func (NetworkInterfaceInfo) GetRegion

func (v NetworkInterfaceInfo) GetRegion() string

func (NetworkInterfaceInfo) GetResourceArn

func (v NetworkInterfaceInfo) GetResourceArn() string

func (NetworkInterfaceInfo) GetResourceName

func (v NetworkInterfaceInfo) GetResourceName() string

func (NetworkInterfaceInfo) GetResourceType

func (v NetworkInterfaceInfo) GetResourceType() string

type Provider

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

func NewCurrentRegionEC2Provider

func NewCurrentRegionEC2Provider(ctx context.Context, log *clog.Logger, awsAccountID string, cfg aws.Config, factory awslib.CrossRegionFactory[Client]) *Provider

func NewEC2Provider

func NewEC2Provider(ctx context.Context, log *clog.Logger, awsAccountID string, cfg aws.Config, factory awslib.CrossRegionFactory[Client]) *Provider

func (*Provider) CreateSnapshots

func (p *Provider) CreateSnapshots(ctx context.Context, ins *Ec2Instance) ([]EBSSnapshot, error)

func (*Provider) DeleteSnapshot

func (p *Provider) DeleteSnapshot(ctx context.Context, snapshot EBSSnapshot) error

func (*Provider) DescribeInstances

func (p *Provider) DescribeInstances(ctx context.Context) ([]*Ec2Instance, error)

func (*Provider) DescribeInternetGateways

func (p *Provider) DescribeInternetGateways(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeNatGateways

func (p *Provider) DescribeNatGateways(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeNetworkAcl

func (p *Provider) DescribeNetworkAcl(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeNetworkInterfaces

func (p *Provider) DescribeNetworkInterfaces(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeSecurityGroups

func (p *Provider) DescribeSecurityGroups(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeSnapshots

func (p *Provider) DescribeSnapshots(ctx context.Context, snapshot EBSSnapshot) ([]EBSSnapshot, error)

TODO: Maybe we should bulk request snapshots? This will limit us scaling the pipeline

func (*Provider) DescribeSubnets

func (p *Provider) DescribeSubnets(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeTransitGatewayAttachments

func (p *Provider) DescribeTransitGatewayAttachments(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeTransitGateways

func (p *Provider) DescribeTransitGateways(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeVolumes

func (p *Provider) DescribeVolumes(ctx context.Context, instances []*Ec2Instance) ([]*Volume, error)

func (*Provider) DescribeVpcPeeringConnections

func (p *Provider) DescribeVpcPeeringConnections(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) DescribeVpcs

func (p *Provider) DescribeVpcs(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) GetEbsEncryptionByDefault

func (p *Provider) GetEbsEncryptionByDefault(ctx context.Context) ([]awslib.AwsResource, error)

func (*Provider) GetRouteTableForSubnet

func (p *Provider) GetRouteTableForSubnet(ctx context.Context, region string, subnetId string, vpcId string) (types.RouteTable, error)

type SecurityGroup

type SecurityGroup struct {
	types.SecurityGroup
	// contains filtered or unexported fields
}

func (SecurityGroup) GetRegion

func (s SecurityGroup) GetRegion() string

func (SecurityGroup) GetResourceArn

func (s SecurityGroup) GetResourceArn() string

func (SecurityGroup) GetResourceName

func (s SecurityGroup) GetResourceName() string

func (SecurityGroup) GetResourceType

func (s SecurityGroup) GetResourceType() string

type SecurityGroupInfo

type SecurityGroupInfo struct {
	GroupId   *string `json:"group_id,omitempty"`
	GroupName *string `json:"group_name,omitempty"`
}

type SubnetInfo

type SubnetInfo struct {
	Subnet types.Subnet `json:"subnet"`
	// contains filtered or unexported fields
}

func (SubnetInfo) GetRegion

func (v SubnetInfo) GetRegion() string

func (SubnetInfo) GetResourceArn

func (v SubnetInfo) GetResourceArn() string

func (SubnetInfo) GetResourceName

func (v SubnetInfo) GetResourceName() string

func (SubnetInfo) GetResourceType

func (v SubnetInfo) GetResourceType() string

type TransitGatewayAttachmentInfo

type TransitGatewayAttachmentInfo struct {
	TransitGatewayAttachment types.TransitGatewayAttachment `json:"transit_gateway_attachment"`
	// contains filtered or unexported fields
}

func (TransitGatewayAttachmentInfo) GetRegion

func (v TransitGatewayAttachmentInfo) GetRegion() string

func (TransitGatewayAttachmentInfo) GetResourceArn

func (v TransitGatewayAttachmentInfo) GetResourceArn() string

func (TransitGatewayAttachmentInfo) GetResourceName

func (v TransitGatewayAttachmentInfo) GetResourceName() string

func (TransitGatewayAttachmentInfo) GetResourceType

func (v TransitGatewayAttachmentInfo) GetResourceType() string

type TransitGatewayInfo

type TransitGatewayInfo struct {
	TransitGateway types.TransitGateway `json:"transit_gateway"`
	// contains filtered or unexported fields
}

func (TransitGatewayInfo) GetRegion

func (v TransitGatewayInfo) GetRegion() string

func (TransitGatewayInfo) GetResourceArn

func (v TransitGatewayInfo) GetResourceArn() string

func (TransitGatewayInfo) GetResourceName

func (v TransitGatewayInfo) GetResourceName() string

func (TransitGatewayInfo) GetResourceType

func (v TransitGatewayInfo) GetResourceType() string

type Volume

type Volume struct {
	VolumeId   string
	InstanceId string
	Region     string
	Size       int
	Encrypted  bool
	Device     string
}

type VpcInfo

type VpcInfo struct {
	Vpc      types.Vpc       `json:"vpc"`
	FlowLogs []types.FlowLog `json:"flow_logs"`
	// contains filtered or unexported fields
}

func (VpcInfo) GetRegion

func (v VpcInfo) GetRegion() string

func (VpcInfo) GetResourceArn

func (v VpcInfo) GetResourceArn() string

func (VpcInfo) GetResourceName

func (v VpcInfo) GetResourceName() string

func (VpcInfo) GetResourceType

func (v VpcInfo) GetResourceType() string

type VpcPeeringConnectionInfo

type VpcPeeringConnectionInfo struct {
	VpcPeeringConnection types.VpcPeeringConnection `json:"vpc_peering_connection"`
	// contains filtered or unexported fields
}

func (VpcPeeringConnectionInfo) GetRegion

func (v VpcPeeringConnectionInfo) GetRegion() string

func (VpcPeeringConnectionInfo) GetResourceArn

func (v VpcPeeringConnectionInfo) GetResourceArn() string

func (VpcPeeringConnectionInfo) GetResourceName

func (v VpcPeeringConnectionInfo) GetResourceName() string

func (VpcPeeringConnectionInfo) GetResourceType

func (v VpcPeeringConnectionInfo) GetResourceType() string

Jump to

Keyboard shortcuts

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