executors

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assumption

type Assumption struct {
	Lifetime
	Mfa
	// contains filtered or unexported fields
}

Assumption describes the parameters that result in a Role

func (*Assumption) Execute

func (a *Assumption) Execute() (creds.Creds, error)

Execute actions a role assumption object with creds from the environment

func (*Assumption) ExecuteWithCreds

func (a *Assumption) ExecuteWithCreds(c creds.Creds) (creds.Creds, error)

ExecuteWithCreds actions a role assumption with provided creds

func (*Assumption) GetAccountID

func (a *Assumption) GetAccountID() (string, error)

GetAccountID gets the target account ID

func (*Assumption) GetPolicy

func (a *Assumption) GetPolicy() (string, error)

GetPolicy gets the new IAM policy

func (*Assumption) GetRoleName

func (a *Assumption) GetRoleName() (string, error)

GetRoleName gets the target role name

func (*Assumption) GetSessionName

func (a *Assumption) GetSessionName() (string, error)

GetSessionName gets the target session name

func (*Assumption) SetAccountID

func (a *Assumption) SetAccountID(val string) error

SetAccountID sets the target account ID

func (*Assumption) SetPolicy

func (a *Assumption) SetPolicy(val string) error

SetPolicy sets the new IAM policy

func (*Assumption) SetRoleName

func (a *Assumption) SetRoleName(val string) error

SetRoleName sets the target role name

func (*Assumption) SetSessionName

func (a *Assumption) SetSessionName(val string) error

SetSessionName sets the target session name

type Executor

type Executor interface {
	Execute() (creds.Creds, error)
	ExecuteWithCreds(creds.Creds) (creds.Creds, error)
	SetAccountID(string) error
	SetRoleName(string) error
	SetSessionName(string) error
	SetPolicy(string) error
	SetLifetime(int64) error
	SetMfa(bool) error
	SetMfaSerial(string) error
	SetMfaCode(string) error
	GetAccountID() (string, error)
	GetRoleName() (string, error)
	GetSessionName() (string, error)
	GetPolicy() (string, error)
	GetLifetime() (int64, error)
	GetMfa() (bool, error)
	GetMfaSerial() (string, error)
	GetMfaCode() (string, error)
}

Executor defines the interface for requesting a new set of AWS creds

type Lifetime

type Lifetime struct {
	// contains filtered or unexported fields
}

Lifetime object encapsulates the setup of session duration

func (*Lifetime) GetLifetime

func (l *Lifetime) GetLifetime() (int64, error)

GetLifetime returns the lifetime of the executor

func (*Lifetime) SetLifetime

func (l *Lifetime) SetLifetime(val int64) error

SetLifetime allows setting the credential lifespan

type Mfa

type Mfa struct {
	// contains filtered or unexported fields
}

Mfa object encapsulates the setup of MFA for API calls

func (*Mfa) GetMfa

func (m *Mfa) GetMfa() (bool, error)

GetMfa returns if MFA will be used

func (*Mfa) GetMfaCode

func (m *Mfa) GetMfaCode() (string, error)

GetMfaCode returns the OTP to use

func (*Mfa) GetMfaSerial

func (m *Mfa) GetMfaSerial() (string, error)

GetMfaSerial returns the ARN of the MFA device

func (*Mfa) SetMfa

func (m *Mfa) SetMfa(val bool) error

SetMfa sets whether MFA is used

func (*Mfa) SetMfaCode

func (m *Mfa) SetMfaCode(val string) error

SetMfaCode sets the OTP for MFA

func (*Mfa) SetMfaSerial

func (m *Mfa) SetMfaSerial(val string) error

SetMfaSerial sets the ARN of the MFA device

type Signin

type Signin struct {
	Lifetime
	Mfa
}

Signin describes the parameters to perform GetSigninToken

func (*Signin) Execute

func (s *Signin) Execute() (creds.Creds, error)

Execute actions the signin object with creds from the environment

func (*Signin) ExecuteWithCreds

func (s *Signin) ExecuteWithCreds(c creds.Creds) (creds.Creds, error)

ExecuteWithCreds actions the signin object with the provided creds

func (*Signin) GetAccountID

func (s *Signin) GetAccountID() (string, error)

GetAccountID gets the target account ID

func (*Signin) GetPolicy

func (s *Signin) GetPolicy() (string, error)

GetPolicy gets the new IAM policy

func (*Signin) GetRoleName

func (s *Signin) GetRoleName() (string, error)

GetRoleName gets the target role name

func (*Signin) GetSessionName

func (s *Signin) GetSessionName() (string, error)

GetSessionName gets the target session name

func (*Signin) SetAccountID

func (s *Signin) SetAccountID(val string) error

SetAccountID sets the target account ID

func (*Signin) SetPolicy

func (s *Signin) SetPolicy(val string) error

SetPolicy sets the new IAM policy

func (*Signin) SetRoleName

func (s *Signin) SetRoleName(val string) error

SetRoleName sets the target role name

func (*Signin) SetSessionName

func (s *Signin) SetSessionName(val string) error

SetSessionName sets the target session name

Jump to

Keyboard shortcuts

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