Documentation
¶
Index ¶
- type Assumption
- func (a *Assumption) Execute() (creds.Creds, error)
- func (a *Assumption) ExecuteWithCreds(c creds.Creds) (creds.Creds, error)
- func (a *Assumption) GetAccountID() (string, error)
- func (a *Assumption) GetPolicy() (string, error)
- func (a *Assumption) GetRoleName() (string, error)
- func (a *Assumption) GetSessionName() (string, error)
- func (a *Assumption) SetAccountID(val string) error
- func (a *Assumption) SetPolicy(val string) error
- func (a *Assumption) SetRoleName(val string) error
- func (a *Assumption) SetSessionName(val string) error
- type DefaultMfaPrompt
- type Executor
- type Lifetime
- type Mfa
- func (m *Mfa) GetMfa() (bool, error)
- func (m *Mfa) GetMfaCode() (string, error)
- func (m *Mfa) GetMfaPrompt() (MfaPrompt, error)
- func (m *Mfa) GetMfaSerial() (string, error)
- func (m *Mfa) SetMfa(val bool) error
- func (m *Mfa) SetMfaCode(val string) error
- func (m *Mfa) SetMfaPrompt(val MfaPrompt) error
- func (m *Mfa) SetMfaSerial(val string) error
- type MfaPrompt
- type Signin
- func (s *Signin) Execute() (creds.Creds, error)
- func (s *Signin) ExecuteWithCreds(c creds.Creds) (creds.Creds, error)
- func (s *Signin) GetAccountID() (string, error)
- func (s *Signin) GetPolicy() (string, error)
- func (s *Signin) GetRoleName() (string, error)
- func (s *Signin) GetSessionName() (string, error)
- func (s *Signin) SetAccountID(_ string) error
- func (s *Signin) SetPolicy(_ string) error
- func (s *Signin) SetRoleName(_ string) error
- func (s *Signin) SetSessionName(_ string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assumption ¶
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 ¶
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 DefaultMfaPrompt ¶ added in v0.10.0
type DefaultMfaPrompt struct{}
DefaultMfaPrompt defines the standard CLI-based MFA prompt
func (*DefaultMfaPrompt) Prompt ¶ added in v0.10.0
func (p *DefaultMfaPrompt) Prompt() (string, error)
Prompt asks the user for their MFA token
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 SetMfaPrompt(MfaPrompt) 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) GetMfaPrompt() (MfaPrompt, 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 ¶
GetLifetime returns the lifetime of the executor
func (*Lifetime) SetLifetime ¶
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) GetMfaCode ¶
GetMfaCode returns the OTP to use
func (*Mfa) GetMfaPrompt ¶ added in v0.9.0
GetMfaPrompt returns the function to use for asking the user for an MFA code
func (*Mfa) GetMfaSerial ¶
GetMfaSerial returns the ARN of the MFA device
func (*Mfa) SetMfaPrompt ¶ added in v0.9.0
SetMfaPrompt provides a custom method for loading the MFA code
func (*Mfa) SetMfaSerial ¶
SetMfaSerial sets the ARN of the MFA device
type MfaPrompt ¶ added in v0.10.0
MfaPrompt interface describes an object which can prompt the user for their MFA
type Signin ¶
Signin describes the parameters to perform GetSigninToken
func (*Signin) ExecuteWithCreds ¶
ExecuteWithCreds actions the signin object with the provided creds
func (*Signin) GetAccountID ¶
GetAccountID gets the target account ID
func (*Signin) GetRoleName ¶
GetRoleName gets the target role name
func (*Signin) GetSessionName ¶
GetSessionName gets the target session name
func (*Signin) SetAccountID ¶
SetAccountID sets the target account ID
func (*Signin) SetRoleName ¶
SetRoleName sets the target role name
func (*Signin) SetSessionName ¶
SetSessionName sets the target session name