credentials

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AWS_CREDENTIAL_PROCESS_VERSION int = 1

AWS_CREDENTIAL_PROCESS_VERSION defines the supported AWS credential_process version

View Source
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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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