context

package
v0.0.0-...-a4d1c73 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package context provides context for perun.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSession

func CreateSession(context *Context, profile string, region *string) (*session.Session, error)

CreateSession creates session based on profile and region.

func InitializeSession

func InitializeSession(context *Context) *session.Session

InitializeSession creates session and updates session token.

func UpdateSessionToken

func UpdateSessionToken(profile string, region string, defaultDuration int64, context *Context) error

UpdateSessionToken updates session token for profile in .aws/credentials.

Types

type Context

type Context struct {
	CliArguments        cliparser.CliArguments
	Logger              logger.LoggerInt
	Config              configuration.Configuration
	InconsistencyConfig configuration.InconsistencyConfiguration
	CloudFormation      awsapi.CloudFormationAPI
	CurrentSession      *session.Session
}

Context contains perun's logger, configuration, information about inconsistency between specification and documentation, and session.

func GetContext

func GetContext(cliArgParser cliArgumentsParser, confReader configurationReader, inconsistReader inconsistenciesReader) (context Context, err error)

GetContext creates CLI context. Creating logger and config and checking inconsistency.

func (*Context) InitializeAwsAPI

func (context *Context) InitializeAwsAPI()

InitializeAwsAPI creates session.

Jump to

Keyboard shortcuts

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