ui

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colourise

func Colourise(msg, status string) string

Colourise wraps a message in an appropriate colour based on the accompanying status string

func ColouriseDiff

func ColouriseDiff(d diff.Diff, longFormat bool) string

ColouriseDiff wraps a diff object in nice colours

func ColouriseStatus

func ColouriseStatus(status string) string

ColouriseStatus wraps a status code in an appropriate colour

func Errorf

func Errorf(err error, message string, parts ...interface{}) error

Errorf wraps an error, extracting the AWS API error if it exists

func Indent

func Indent(prefix string, in string) string

Indent adds prefix to every line of in

func StackHasSettled

func StackHasSettled(stack types.Stack) bool

StackHasSettled returns whether a given status represents a stack that has settled, i.e. is not updating

Types

type UI added in v0.2.0

type UI struct {
	// contains filtered or unexported fields
}

func New added in v0.2.0

func New(cfg aws.Config) *UI

New creates a new UI.

func (*UI) FormatChangeSet added in v0.3.0

func (u *UI) FormatChangeSet(ctx context.Context, stackName, changeSetName string) (string, error)

func (*UI) GetStackOutput added in v0.2.0

func (u *UI) GetStackOutput(ctx context.Context, stack types.Stack) (string, []string)

GetStackOutput returns a pretty representation of a CloudFormation stack's status

func (*UI) GetStackSummary added in v0.2.0

func (u *UI) GetStackSummary(ctx context.Context, stack types.Stack, long bool) string

GetStackSummary returns a string representation of an existing stack. If long is false, only the stack status and stack outputs will be included. If long is true, resources and parameters will be also included in the output.

func (*UI) WaitForStackToSettle added in v0.2.0

func (u *UI) WaitForStackToSettle(ctx context.Context, stackName string) (string, []string)

WaitForStackToSettle blocks excute until a stack has finished updating and then returns its status

Jump to

Keyboard shortcuts

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