securestorage

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCouldNotOpenKeyring error = errors.New("keyring not opened successfully")

Functions

This section is empty.

Types

type IAMCredentialsSecureStorage

type IAMCredentialsSecureStorage struct {
	SecureStorage SecureStorage
}

func NewSecureIAMCredentialStorage

func NewSecureIAMCredentialStorage() IAMCredentialsSecureStorage

func (*IAMCredentialsSecureStorage) GetCredentials

func (i *IAMCredentialsSecureStorage) GetCredentials(profile string) (credentials aws.Credentials, err error)

func (*IAMCredentialsSecureStorage) StoreCredentials

func (i *IAMCredentialsSecureStorage) StoreCredentials(profile string, credentials aws.Credentials) (err error)

type SSOToken

type SSOToken struct {
	AccessToken string
	Expiry      time.Time
}

type SSOTokensSecureStorage

type SSOTokensSecureStorage struct {
	SecureStorage SecureStorage
}

func NewSecureSSOTokenStorage

func NewSecureSSOTokenStorage() SSOTokensSecureStorage

func (*SSOTokensSecureStorage) ClearSSOToken

func (s *SSOTokensSecureStorage) ClearSSOToken(profileKey string)

Attempts to clear the token, any errors will be logged to debug logging

func (*SSOTokensSecureStorage) GetValidSSOToken

func (s *SSOTokensSecureStorage) GetValidSSOToken(profileKey string) *SSOToken

GetValidSSOToken returns nil if no token was found, or if it is expired

func (*SSOTokensSecureStorage) StoreSSOToken

func (s *SSOTokensSecureStorage) StoreSSOToken(profileKey string, ssoTokenValue SSOToken)

Attempts to store the token, any errors will be logged to debug logging

type SecureStorage

type SecureStorage struct {
	StoragePrefix string
	StorageSuffix string
	Debug         bool
	// contains filtered or unexported fields
}

func (*SecureStorage) Clear

func (s *SecureStorage) Clear(key string) error

func (*SecureStorage) HasKey

func (s *SecureStorage) HasKey(key string) (bool, error)

returns false if the key is not found, true if it is found, or false and an error if there was a keyring related error

func (*SecureStorage) List

func (s *SecureStorage) List() ([]keyring.Item, error)

func (*SecureStorage) ListKeys

func (s *SecureStorage) ListKeys() ([]string, error)

func (*SecureStorage) Retrieve

func (s *SecureStorage) Retrieve(key string, target interface{}) error

returns keyring.ErrKeyNotFound if not found

func (*SecureStorage) Store

func (s *SecureStorage) Store(key string, payload interface{}) error

Jump to

Keyboard shortcuts

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