helpers

package
v0.0.0-...-bee802e Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CfnSession

func CfnSession() *cloudformation.CloudFormation

CfnSession returns a shared CfnSession

func Ec2Session

func Ec2Session() *ec2.EC2

Ec2Session returns a shared Ec2Session

func GetAllEc2Instances

func GetAllEc2Instances() []*ec2.Reservation

GetAllEc2Instances retrieves all EC2 instances

func GetAllSecurityGroups

func GetAllSecurityGroups() []*ec2.SecurityGroup

GetAllSecurityGroups returns a list of all securitygroups in the region

func GetEc2BySecurityGroup

func GetEc2BySecurityGroup(securitygroupID *string) []*ec2.Reservation

GetEc2BySecurityGroup retrieves all instances attached to a securitygroup

func GetEc2Name

func GetEc2Name(ec2name *string) string

GetEc2Name returns the name of the provided EC2 Resource

func GetNestedCloudFormationResources

func GetNestedCloudFormationResources(stackname *string) []*cloudformation.StackResource

GetNestedCloudFormationResources retrieves a slice of the Stack Resources that are in the provided stack or in one of its children

func GetRDSName

func GetRDSName(rdsname *string) string

GetRDSName returns the name of the provided RDS Resource

func GetResourcesByStackName

func GetResourcesByStackName(stackname *string) []*cloudformation.StackResource

GetResourcesByStackName returns a slice of the Stack Resources in the provided stack

func IsLatestInstanceFamily

func IsLatestInstanceFamily(instanceFamily string) bool

IsLatestInstanceFamily checks if an instance is part of the la test family is running in the latest instance family. TODO: Automate this to work properly

func RDSSession

func RDSSession() *rds.RDS

RDSSession returns a shared RDSSession

Types

type OutputArray

type OutputArray struct {
	Contents []OutputHolder
	Keys     []string
}

OutputArray holds all the different OutputHolders that will be provided as output, as well as the keys (headers) that will actually need to be printed

func (*OutputArray) AddHolder

func (output *OutputArray) AddHolder(holder OutputHolder)

AddHolder adds the provided OutputHolder to the OutputArray

func (OutputArray) Write

func (output OutputArray) Write(settings config.Config)

Write will provide the output as configured in the configuration

type OutputHolder

type OutputHolder struct {
	Contents map[string]string
}

OutputHolder holds key-value pairs that belong together in the output

Jump to

Keyboard shortcuts

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