cachedcredsprovider

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedCredProvider

type CachedCredProvider struct {
	credentials.Provider
	// contains filtered or unexported fields
}

CachedCredProvider is the custom credential provider that we use in the credential provider chain when creating a new AWS SDK session.

func New

func New(filePath string) *CachedCredProvider

New - Returns an instance of CachedCredProvider, requiring a cache file path.

func (*CachedCredProvider) GetCredentialExpiryTime added in v0.0.8

func (p *CachedCredProvider) GetCredentialExpiryTime() time.Time

GetCredentialExpiryTime - Returns the expiry time for these credentials.

func (*CachedCredProvider) IsExpired

func (p *CachedCredProvider) IsExpired() bool

IsExpired - Interface function to determine if credentials need to be refreshed.

func (*CachedCredProvider) Retrieve

func (p *CachedCredProvider) Retrieve() (credentials.Value, error)

Retrieve - Interface function that returns the credential values.

func (*CachedCredProvider) WriteNewCredentialsFromSTS

func (p *CachedCredProvider) WriteNewCredentialsFromSTS(c *sts.Credentials, filePath string) error

WriteNewCredentialsFromSTS - Will transform the STS credentials struct to a CachedCredentials struct then overwrite current values, and write it all to disk.

type CachedCredentials

type CachedCredentials struct {
	ExpiresAt time.Time
	Values    credentials.Value
}

CachedCredentials represents the entire JSON blob that we store.

Jump to

Keyboard shortcuts

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