aws

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2Client

type EC2Client interface {
	DescribeVpcs(ctx context.Context, params *ec2.DescribeVpcsInput, opts ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error)
	DescribeSubnets(ctx context.Context, params *ec2.DescribeSubnetsInput, opts ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error)
	DescribeRouteTables(ctx context.Context, params *ec2.DescribeRouteTablesInput, opts ...func(*ec2.Options)) (*ec2.DescribeRouteTablesOutput, error)
}

EC2Client is a minimal interface for the EC2 client with only the methods used by the CLI.

type ElastiCacheClient

type ElastiCacheClient interface {
	DescribeCacheClusters(ctx context.Context, params *elasticache.DescribeCacheClustersInput, optFns ...func(*elasticache.Options)) (*elasticache.DescribeCacheClustersOutput, error)
}

ElastiCacheClient is a minimal interface for the ElastiCache client with only the methods used by the CLI.

type ElastiCacheCluster

type ElastiCacheCluster struct {
	// Arn is the ARN of the ElastiCache cluster, such as `arn:aws:elasticache:ca-central-1:123:cluster:foo`.
	Arn string
	// Name is the human-readable name of the ElastiCache cluster.
	Name string
	/*// Nodes is a list of nodes in the ElastiCache cluster.
	Nodes []ElastiCacheNode*/
	// PrimaryEndpoint is the primary endpoint for the ElastiCache cluster.
	// If the cluster is not configured as a cluster, this is the endpoint for the single node.
	PrimaryEndpoint string
}

ElastiCacheCluster represents an AWS ElastiCache cluster and its nodes.

func (ElastiCacheCluster) String

func (e ElastiCacheCluster) String() string

type ElastiCacheNode

type ElastiCacheNode struct {
	// Name is the human-readable name of the node.
	Name string
	// Endpoint is the endpoint of the node.
	Endpoint string
}

ElastiCacheNode represents a node in an AWS ElastiCache cluster.

type ResourceLister

type ResourceLister interface {
	// ListVpcs returns a list of VPCs within the region configured in the client.
	ListVpcs(ctx context.Context) ([]Vpc, error)
	// ListSubnets returns a list of all Subnets within the region configured in the client, regardless of VPC.
	ListSubnets(ctx context.Context) ([]Subnet, error)
	// ListElastiCacheClusters returns a list of all ElastiCache clusters within the region configured in the client.
	ListElastiCacheClusters(ctx context.Context) ([]ElastiCacheCluster, error)
}

ResourceLister allows retrieving a list of AWS resources.

func NewAwsResourceLister

func NewAwsResourceLister(client EC2Client, elasticacheClient ElastiCacheClient) ResourceLister

NewAwsResourceLister creates a new ResourceLister that uses the provided EC2 client.

type SsmClient

type SsmClient interface {
	GetParameter(ctx context.Context, params *ssm.GetParameterInput, optFns ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
	StartSession(ctx context.Context, params *ssm.StartSessionInput, optFns ...func(*ssm.Options)) (*ssm.StartSessionOutput, error)
	TerminateSession(ctx context.Context, params *ssm.TerminateSessionInput, optFns ...func(*ssm.Options)) (*ssm.TerminateSessionOutput, error)
}

SsmClient is a minimal interface for the AWS SSM client with only the methods used by the CLI.

type Subnet

type Subnet struct {
	// ID is the AWS representation of the Subnet ID (not the ARN).
	Id string
	// Name is a human-readable name for the Subnet.
	Name string
	// Public indicates whether the subnet is public or private.
	Public bool
	// VpcId is the ID of the VPC that the subnet is associated with.
	VpcId string
}

Subnet provides some basic information about a Subnet.

func (Subnet) String

func (s Subnet) String() string

type Vpc

type Vpc struct {
	// ID is the AWS representation of the VPC ID (not the ARN).
	Id string
	// Name is a human-readable name for the VPC.
	Name string
}

Vpc provides some basic information about a VPC.

func (Vpc) String

func (v Vpc) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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