Documentation ¶
Index ¶
- Variables
- type Assumption
- type Creds
- func (c *Creds) New(argCreds map[string]string) error
- func (c *Creds) NewFromEnv() error
- func (c *Creds) NewFromStsSdk(stsCreds *sts.Credentials) error
- func (c Creds) ToConsoleURL() (string, error)
- func (c Creds) ToEnvVars() []string
- func (c *Creds) ToSdk() *credentials.Credentials
- func (c Creds) Translate(dictionary map[string]string) map[string]string
- type CredsExecutor
- type Lifetime
- type Mfa
- type Signin
Constants ¶
This section is empty.
Variables ¶
var API = api{}
API exposes the STS API and related info
var Translations = map[string]map[string]string{
"envvar": {
"AWS_ACCESS_KEY_ID": "AccessKey",
"AWS_SECRET_ACCESS_KEY": "SecretKey",
"AWS_SESSION_TOKEN": "SessionToken",
"AWS_SECURITY_TOKEN": "SessionToken",
},
"console": {
"sessionId": "AccessKey",
"sessionKey": "SecretKey",
"sessionToken": "SessionToken",
},
}
Translations defines common mappings for credential variables
var Version = "unset"
Version is overriden by link flags during build
Functions ¶
This section is empty.
Types ¶
type Assumption ¶
type Assumption struct { RoleName string AccountID string SessionName string Policy string Lifetime Mfa }
Assumption describes the parameters that result in a Role
func (*Assumption) Execute ¶ added in v0.0.3
func (a *Assumption) Execute() (Creds, error)
Execute actions a role assumption object with creds from the environment
func (*Assumption) ExecuteWithCreds ¶ added in v0.0.5
func (a *Assumption) ExecuteWithCreds(c Creds) (Creds, error)
ExecuteWithCreds actions a role assumption with provided creds
func (*Assumption) ParseFlags ¶ added in v0.0.3
func (a *Assumption) ParseFlags(cmd *cobra.Command) error
ParseFlags for assumption object
type Creds ¶ added in v0.0.3
type Creds struct {
AccessKey, SecretKey, SessionToken string
}
Creds defines a set of AWS credentials
func (*Creds) NewFromEnv ¶ added in v0.0.3
NewFromEnv initializes credentials from the environment variables
func (*Creds) NewFromStsSdk ¶ added in v0.0.5
func (c *Creds) NewFromStsSdk(stsCreds *sts.Credentials) error
NewFromStsSdk initializes a credential object from an AWS SDK Credentials object
func (Creds) ToConsoleURL ¶ added in v0.0.3
ToConsoleURL returns a console URL for the role
func (Creds) ToEnvVars ¶ added in v0.0.3
ToEnvVars returns environment variables suitable for eval-ing into the shell
func (*Creds) ToSdk ¶ added in v0.0.5
func (c *Creds) ToSdk() *credentials.Credentials
ToSdk returns an AWS SDK Credentials object
type CredsExecutor ¶ added in v0.0.3
type CredsExecutor interface { ParseFlags(*cobra.Command) error Execute() (Creds, error) ExecuteWithCreds(Creds) (Creds, error) }
CredsExecutor defines the interface for requesting a new set of AWS creds
type Lifetime ¶ added in v0.0.3
type Lifetime struct {
LifetimeInt int64
}
Lifetime object encapsulates the setup of session duration
type Signin ¶ added in v0.0.3
Signin describes the parameters to perform GetSigninToken
func (*Signin) Execute ¶ added in v0.0.3
Execute actions the signin object with creds from the environment
func (*Signin) ExecuteWithCreds ¶ added in v0.0.5
ExecuteWithCreds actions the signin object with the provided creds