Documentation ¶
Index ¶
Constants ¶
View Source
const (
// CharSet for SES email
CharSet = "UTF-8"
)
Variables ¶
This section is empty.
Functions ¶
func GetRegions ¶
func GetRegions(ctx context.Context, sess DescribeRegioner) *ec2.DescribeRegionsOutput
GetRegions will return a DescribeRegionsOutput stuct containing our slice of regions.
It requires that you pass an already created session.
Types ¶
type APIMap ¶
type APIMap map[string][]Ec2instance
APIMap stores the Region name are the key and a slice of Ec2Instance structs for use later
func GetInstances ¶
func GetInstances(regions *ec2.DescribeRegionsOutput) []APIMap
GetInstances takes a pointer to a DescribeRegionsOutput to query all of the instances in a region and build on our Ec2instance struct The Ec2instance structs will be stored as a slice in a map to organized in fashion that can easily we looped over.GetInstances
Example: map[us-east-1:[{i-030b2417f941cdbbf t2.micro 2018-06-28 17:11:20 +0000 UTC stopped aw-mac us-east-1}]]
type DescribeRegioner ¶
type DescribeRegioner interface {
DescribeRegionsWithContext(aws.Context, *ec2.DescribeRegionsInput, ...request.Option) (*ec2.DescribeRegionsOutput, error)
}
Click to show internal directories.
Click to hide internal directories.