Documentation ¶
Index ¶
- type Client
- func (c *Client) AuthorizeSecurityGroupEgress(ctx context.Context, params *ec2.AuthorizeSecurityGroupEgressInput, ...) (*ec2.AuthorizeSecurityGroupEgressOutput, error)
- func (c *Client) CreateSecurityGroup(ctx context.Context, params *ec2.CreateSecurityGroupInput, ...) (*ec2.CreateSecurityGroupOutput, error)
- func (c *Client) DeleteKeyPair(ctx context.Context, params *ec2.DeleteKeyPairInput, ...) (*ec2.DeleteKeyPairOutput, error)
- func (c *Client) DeleteSecurityGroup(ctx context.Context, params *ec2.DeleteSecurityGroupInput, ...) (*ec2.DeleteSecurityGroupOutput, error)
- func (c *Client) DescribeInstanceTypes(ctx context.Context, input *ec2.DescribeInstanceTypesInput, ...) (*ec2.DescribeInstanceTypesOutput, error)
- func (c *Client) DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, ...) (*ec2.DescribeInstancesOutput, error)
- func (c *Client) DescribeKeyPairs(ctx context.Context, params *ec2.DescribeKeyPairsInput, ...) (*ec2.DescribeKeyPairsOutput, error)
- func (c *Client) DescribeSecurityGroups(ctx context.Context, params *ec2.DescribeSecurityGroupsInput, ...) (*ec2.DescribeSecurityGroupsOutput, error)
- func (c *Client) DescribeSubnets(ctx context.Context, params *ec2.DescribeSubnetsInput, ...) (*ec2.DescribeSubnetsOutput, error)
- func (c *Client) DescribeVpcAttribute(ctx context.Context, input *ec2.DescribeVpcAttributeInput, ...) (*ec2.DescribeVpcAttributeOutput, error)
- func (c *Client) GetConsoleOutput(ctx context.Context, input *ec2.GetConsoleOutputInput, ...) (*ec2.GetConsoleOutputOutput, error)
- func (c *Client) ImportKeyPair(ctx context.Context, params *ec2.ImportKeyPairInput, ...) (*ec2.ImportKeyPairOutput, error)
- func (c *Client) RevokeSecurityGroupEgress(ctx context.Context, params *ec2.RevokeSecurityGroupEgressInput, ...) (*ec2.RevokeSecurityGroupEgressOutput, error)
- func (c *Client) RunInstances(ctx context.Context, params *ec2.RunInstancesInput, ...) (*ec2.RunInstancesOutput, error)
- func (c *Client) SetClient(e EC2Client)
- func (c *Client) TerminateEC2Instance(ctx context.Context, instanceID string) error
- type EC2Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Region string // contains filtered or unexported fields }
Client represents an AWS Client For mocking the whole aws client, use the following: mockgen -source=pkg/clients/aws/aws.go -package mocks -destination=pkg/mocks/mock_aws.go
func NewClient ¶
func NewClient(ctx context.Context, accessID, accessSecret, sessiontoken, region, profile string) (*Client, error)
NewClient creates AWS Client either pass in secret data or profile to work .
func NewClientFromConfig ¶ added in v0.2.0
NewClientFromConfig creates an osd-network-verifier AWS Client from an aws-sdk-go-v2 Config
func (*Client) AuthorizeSecurityGroupEgress ¶
func (c *Client) AuthorizeSecurityGroupEgress(ctx context.Context, params *ec2.AuthorizeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupEgressOutput, error)
func (*Client) CreateSecurityGroup ¶
func (c *Client) CreateSecurityGroup(ctx context.Context, params *ec2.CreateSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.CreateSecurityGroupOutput, error)
func (*Client) DeleteKeyPair ¶ added in v0.3.0
func (c *Client) DeleteKeyPair(ctx context.Context, params *ec2.DeleteKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.DeleteKeyPairOutput, error)
func (*Client) DeleteSecurityGroup ¶
func (c *Client) DeleteSecurityGroup(ctx context.Context, params *ec2.DeleteSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSecurityGroupOutput, error)
func (*Client) DescribeInstanceTypes ¶
func (c *Client) DescribeInstanceTypes(ctx context.Context, input *ec2.DescribeInstanceTypesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypesOutput, error)
func (*Client) DescribeInstances ¶
func (c *Client) DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
func (*Client) DescribeKeyPairs ¶ added in v0.3.0
func (c *Client) DescribeKeyPairs(ctx context.Context, params *ec2.DescribeKeyPairsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeKeyPairsOutput, error)
func (*Client) DescribeSecurityGroups ¶
func (c *Client) DescribeSecurityGroups(ctx context.Context, params *ec2.DescribeSecurityGroupsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error)
func (*Client) DescribeSubnets ¶
func (c *Client) DescribeSubnets(ctx context.Context, params *ec2.DescribeSubnetsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error)
func (*Client) DescribeVpcAttribute ¶
func (c *Client) DescribeVpcAttribute(ctx context.Context, input *ec2.DescribeVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcAttributeOutput, error)
func (*Client) GetConsoleOutput ¶
func (c *Client) GetConsoleOutput(ctx context.Context, input *ec2.GetConsoleOutputInput, optFns ...func(*ec2.Options)) (*ec2.GetConsoleOutputOutput, error)
func (*Client) ImportKeyPair ¶ added in v0.3.0
func (c *Client) ImportKeyPair(ctx context.Context, params *ec2.ImportKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.ImportKeyPairOutput, error)
func (*Client) RevokeSecurityGroupEgress ¶
func (c *Client) RevokeSecurityGroupEgress(ctx context.Context, params *ec2.RevokeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupEgressOutput, error)
func (*Client) RunInstances ¶
func (c *Client) RunInstances(ctx context.Context, params *ec2.RunInstancesInput, optFns ...func(*ec2.Options)) (*ec2.RunInstancesOutput, error)
type EC2Client ¶
type EC2Client 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) DescribeInstanceTypes(ctx context.Context, input *ec2.DescribeInstanceTypesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypesOutput, error) GetConsoleOutput(ctx context.Context, input *ec2.GetConsoleOutputInput, optFns ...func(*ec2.Options)) (*ec2.GetConsoleOutputOutput, error) TerminateInstances(ctx context.Context, input *ec2.TerminateInstancesInput, optFns ...func(*ec2.Options)) (*ec2.TerminateInstancesOutput, error) DescribeVpcAttribute(ctx context.Context, input *ec2.DescribeVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcAttributeOutput, error) CreateSecurityGroup(ctx context.Context, params *ec2.CreateSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.CreateSecurityGroupOutput, error) DeleteSecurityGroup(ctx context.Context, params *ec2.DeleteSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSecurityGroupOutput, error) DescribeSecurityGroups(ctx context.Context, params *ec2.DescribeSecurityGroupsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error) AuthorizeSecurityGroupEgress(ctx context.Context, params *ec2.AuthorizeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupEgressOutput, error) RevokeSecurityGroupEgress(ctx context.Context, params *ec2.RevokeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupEgressOutput, error) DescribeSubnets(ctx context.Context, params *ec2.DescribeSubnetsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error) ImportKeyPair(ctx context.Context, params *ec2.ImportKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.ImportKeyPairOutput, error) DeleteKeyPair(ctx context.Context, params *ec2.DeleteKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.DeleteKeyPairOutput, error) DescribeKeyPairs(ctx context.Context, params *ec2.DescribeKeyPairsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeKeyPairsOutput, error) }
Extend EC2Client so that we can mock them all for testing to re-generate mockfile once another interface is added for testing:
Click to show internal directories.
Click to hide internal directories.