utils

package
v0.0.0-...-6ef1471 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package utils just contains a couple of helper-methods which simplify the implementation of our various sub-commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRoles

func HandleRoles(session *session.Session, roleFile string, callback AWSCallback, void interface{}) []error

HandleRoles invokes the specified callback, handling the case where a role-file is specified or not.

If the roleFile is empty then the function will be invoked once, otherwise it will be invoked for every role.

To allow execution to continue on subsequent roles errors in the execution of a callback do not cause processing of the callback to terminate.

func NewSession

func NewSession() (*session.Session, error)

NewSession returns an AWS session object, with optional request-tracing.

If the environmental variable "DEBUG" is non-empty then requests made to AWS will be logged to the console.

Types

type AWSCallback

type AWSCallback func(svc *ec2.EC2, account string, void interface{}) error

AWSCallback is the signture of a function which can be invoked against either the default AWS account, or against a list of named roles assumed from it, in order.

Jump to

Keyboard shortcuts

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