credentials

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCredential

type AWSCredential struct {
	AWSAccessKeyID     string
	AWSSecretAccessKey string
	AWSRegion          string
}

AWSCredential holds the credential set for an environment

type AWSCredentialStore

type AWSCredentialStore struct {
	Credentials map[string]AWSCredential
	// contains filtered or unexported fields
}

AWSCredentialStore represents a storage for all the credentials

func FromFile

func FromFile(filename string, pass *security.DatabasePassword) (*AWSCredentialStore, error)

FromFile loads an AWSCredentialStore from the given file and decrypts it

func New

func New(storefile string, pass *security.DatabasePassword) *AWSCredentialStore

New creates an empty credential store and sets the storage location

func (*AWSCredentialStore) GetConsoleLoginURL

func (a *AWSCredentialStore) GetConsoleLoginURL(env string, timeout int, subconsole string) (string, error)

GetConsoleLoginURL works with the AWS API to create a federation login URL to the web console for the given environment which will expire after timeout

func (*AWSCredentialStore) SaveToFile

func (a *AWSCredentialStore) SaveToFile() error

SaveToFile stores the encrypted version of the AWSCredentialStore to the file the store has been loaded from

func (*AWSCredentialStore) UpdatePassword added in v0.9.0

func (a *AWSCredentialStore) UpdatePassword(passwd string) error

UpdatePassword changes the password of the store and saves the store encrypted with the new password back to its file

Jump to

Keyboard shortcuts

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