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: 4 modules, 36 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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