clients

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MaxResults = 1000

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsEc2Client

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

func NewAwsEc2Client

func NewAwsEc2Client(cfg aws.Config) *AwsEc2Client

func (*AwsEc2Client) DescribeNetworkInterfaces

func (c *AwsEc2Client) DescribeNetworkInterfaces(ctx context.Context, eniIds []string, resultCh chan utils.Result[[]ec2Types.NetworkInterface])

DescribeNetworkInterfaces fetches all the Network Interfaces based on the list of the ENI IDs provided. If the list is empty, all the existing interfaces will be returned. This function expects a channel to which the response will be provided asynchronously

func (*AwsEc2Client) DescribeNetworkInterfacesBySecurityGroups

func (c *AwsEc2Client) DescribeNetworkInterfacesBySecurityGroups(ctx context.Context, securityGroupIds []string) ([]ec2Types.NetworkInterface, error)

DescribeNetworkInterfacesBySecurityGroups returns a list of Network Interfaces used by the security groups from the input slice

func (*AwsEc2Client) DescribeSecurityGroupRules

func (c *AwsEc2Client) DescribeSecurityGroupRules(ctx context.Context) ([]ec2Types.SecurityGroupRule, error)

DescribeSecurityGroupRules returns all the Security Group Rules. (TODO: try to optimise this to grab a sublist only)

func (*AwsEc2Client) DescribeSecurityGroups

func (c *AwsEc2Client) DescribeSecurityGroups(ctx context.Context, securityGroupIds []string,
	resultCh chan utils.Result[[]ec2Types.SecurityGroup])

DescribeSecurityGroups fetches all the Security Groups based on the list of the IDs provided. If the list is empty, all the existing interfaces will be returned. This function expects a channel to which the response will be provided asynchronously

func (*AwsEc2Client) GetVpceAttachment

GetVpceAttachment returns a pointer to a VPCEAttachment for the network interface. If there is no attachment found, the returned value is a nil.

func (*AwsEc2Client) TryRemoveAllENIs

func (c *AwsEc2Client) TryRemoveAllENIs(ctx context.Context, eniIds []string,
	resultCh chan utils.Result[string])

TryRemoveAllENIs attempts to remove all the Elastic Network interfaces from the list of IDs provided as input. If there is an error encountered for a removal, the function will not stop early.

func (*AwsEc2Client) TryRemoveAllSecurityGroups

func (c *AwsEc2Client) TryRemoveAllSecurityGroups(ctx context.Context, securityGroupIds []string,
	resultCh chan utils.Result[string])

TryRemoveAllSecurityGroups attempts to remove all the Security Groups from the list of IDs provided as input. If there is an error encountered for a removal, the function will not stop early.

type AwsEcsClient

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

func NewAwsEcsClient

func NewAwsEcsClient(cfg aws.Config) *AwsEcsClient

func (*AwsEcsClient) GetEcsAttachment

GetEcsAttachment returns a pointer to an EcsAttachment for the network interface. If there is no attachment found, the returned value is a nil.

type AwsElbClient

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

func NewAwsElbClient

func NewAwsElbClient(cfg aws.Config) *AwsElbClient

func (*AwsElbClient) GetELBAttachment

GetELBAttachment returns a pointer to an ElbAttachment for the network interface. If there is no attachment found, the returned value is a nil.

type AwsLambdaClient

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

func NewAwsLambdaClient

func NewAwsLambdaClient(cfg aws.Config) *AwsLambdaClient

func (*AwsLambdaClient) GetLambdaAttachment

GetLambdaAttachment returns a pointer to an LambdaAttachment for the network interface. If there is no attachment found, the returned value is a nil.

type AwsRdsClient

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

func NewAwsRdsClient

func NewAwsRdsClient(cfg aws.Config) *AwsRdsClient

func (*AwsRdsClient) GetRdsAttachments

func (c *AwsRdsClient) GetRdsAttachments(ctx context.Context, eni ec2Types.NetworkInterface) ([]coreTypes.RdsAttachment, error)

Jump to

Keyboard shortcuts

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