aws

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CompleteStatuses contains all CloudFormation status strings considered complete

FailedStatuses contains all CloudFormation status strings considered failed

PendingStatuses contains all CloudFormation status strings consideredpending

Functions

func DescribeStack

func DescribeStack(cfnSvc cloudformationiface.CloudFormationAPI, stackName string) (*cloudformation.Stack, error)

DescribeStack takes a stackName as input and returns the Stack information along with any errors.

func GetCFNTemplateBody

func GetCFNTemplateBody(cfnTemplate string, input interface{}) (string, error)

GetCFNTemplateBody takes a cfnTemplate and a corresponding struct as input and return the rendered template

func IsComplete

func IsComplete(status string) bool

IsComplete tests if the specified string is considered a completed cloudformation stack state

func IsFailed

func IsFailed(status string) bool

IsFailed tests if the specified string is considered a failed cloudformation stack state

func IsPending

func IsPending(status string) bool

IsPending tests if the specified string is considered a pending cloudformation stack state

func IsStackDoesNotExist

func IsStackDoesNotExist(err error) bool

IsStackDoesNotExist Checks if the error recieved for DescribeStacks denotes if the stack is non exsistent

Types

type MockCloudformationAPI

type MockCloudformationAPI struct {
	cloudformationiface.CloudFormationAPI

	Writes int

	Err    error
	Status string

	FailCreate   bool
	FailDescribe bool
	FailDelete   bool
}

MockCloudformationAPI provides mocked interface to AWS Cloudformation service

func (*MockCloudformationAPI) CreateStack

func (*MockCloudformationAPI) DeleteStack

func (*MockCloudformationAPI) DescribeStacks

func (*MockCloudformationAPI) UpdateStack

func (*MockCloudformationAPI) WaitUntilStackCreateComplete

func (m *MockCloudformationAPI) WaitUntilStackCreateComplete(input *cloudformation.DescribeStacksInput) error

func (*MockCloudformationAPI) WaitUntilStackDeleteComplete

func (m *MockCloudformationAPI) WaitUntilStackDeleteComplete(input *cloudformation.DescribeStacksInput) error

Jump to

Keyboard shortcuts

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