Documentation
¶
Index ¶
- Constants
- func NewCredentialCache() cache.Repository
- type Credentials
- func (r *Credentials) Deserialize(value json.RawMessage) error
- func (c *Credentials) Load() error
- func (c *Credentials) New(code string) error
- func (r *Credentials) Output() error
- func (r *Credentials) Serialize() (json.RawMessage, error)
- func (r *Credentials) Teardown() error
- func (c *Credentials) Validate() error
Constants ¶
const AWS_CREDENTIAL_PROCESS_VERSION int = 1
AWS_CREDENTIAL_PROCESS_VERSION defines the supported AWS credential_process version
const MandatoryRefreshTimeout int = 10 * 60
The time at which all threads will block waiting for refreshed credentials. As defined by Botocore: https://github.com/boto/botocore/blob/221ffa67a567df99ee78d7ae308c0e12d7eeeea7/botocore/credentials.py#L355
Variables ¶
This section is empty.
Functions ¶
func NewCredentialCache ¶
func NewCredentialCache() cache.Repository
Types ¶
type Credentials ¶
type Credentials struct { Version int `json:"Version"` AccessKeyID string `json:"AccessKeyId"` SecretAccessKey string `json:"SecretAccessKey"` SessionToken string `json:"SessionToken"` Expiration time.Time `json:"Expiration"` // contains filtered or unexported fields }
Credentials defines the output format expected by AWS credential_process https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html
func New ¶
func New(cfg assumecfg.AssumeCfg) *Credentials
New defines a response waiting to be fulfilled
func (*Credentials) Deserialize ¶
func (r *Credentials) Deserialize(value json.RawMessage) error
Deserialize JSON into Response struct
func (*Credentials) Load ¶ added in v0.13.0
func (c *Credentials) Load() error
Load STS Temporary Session Credentials from cache.
func (*Credentials) New ¶ added in v0.13.0
func (c *Credentials) New(code string) error
Retrieve new STS Temporary Session Credentials credentials from AWS.
func (*Credentials) Output ¶
func (r *Credentials) Output() error
Output to stdout so aws credential_process can read it https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html
func (*Credentials) Serialize ¶
func (r *Credentials) Serialize() (json.RawMessage, error)
Serialize response into pretty JSON
func (*Credentials) Teardown ¶
func (r *Credentials) Teardown() error
Teardown operations for response, use with defer
func (*Credentials) Validate ¶
func (c *Credentials) Validate() error
Validate ensures the Credentials is of correct format