util

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

func Round

func Round(d, r time.Duration) time.Duration

func SessionToEnvVars

func SessionToEnvVars(awsCreds AwsCreds, account string, role string, profile string)

func StartShell

func StartShell(sessionName string)

func ValidateSession

func ValidateSession(awsCreds AwsCreds) (valid bool)

func WriteSessionFile

func WriteSessionFile(awsCreds AwsCreds, fileName string)

Types

type AwsCreds

type AwsCreds struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	Expiration      int64
	AccountId       string
}

AwsCreds represents a set of AWS credentials

func GetCredsFromFile

func GetCredsFromFile(fileName string) (awsCreds AwsCreds)

func GetNewRoleSession

func GetNewRoleSession(accountId string, roleName string, externalId string, usr user.User) (awsCreds AwsCreds)

func GetNewSession

func GetNewSession(profile string, accountId string, userName string, tokenCode string) (awsCreds AwsCreds)

Jump to

Keyboard shortcuts

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