utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSessionFactory

type AWSSessionFactory struct {
	MasterSession *session.Session
	SessionCache  map[SessionKey]*session.Session
	// contains filtered or unexported fields
}

Returns an AWS session by profile name and region Profile name must be present in the credentials file Master session must be initialized to assume roles in other accounts

func NewAWSSessionFactory

func NewAWSSessionFactory() *AWSSessionFactory

func (*AWSSessionFactory) GenerateMasterSession

func (sessionFactory *AWSSessionFactory) GenerateMasterSession(sessionKey SessionKey) (*session.Session, error)

func (*AWSSessionFactory) GetSession

func (sessionFactory *AWSSessionFactory) GetSession(sessionKey SessionKey) (*session.Session, error)

type SessionKey

type SessionKey struct {
	AccountID  string
	AssumeRole string
	Region     string
}

func (SessionKey) String

func (sessionKey SessionKey) String() string

Jump to

Keyboard shortcuts

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