Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCredentialsHomeNotFound returned when a user home directory can't be located. ErrCredentialsHomeNotFound = errors.New("user home directory not found") // ErrCredentialsNotFound returned when the required aws credentials don't exist. ErrCredentialsNotFound = errors.New("aws credentials not found") )
Functions ¶
This section is empty.
Types ¶
type AWSCredentials ¶
type AWSCredentials struct { AWSAccessKey string `ini:"aws_access_key_id"` AWSSecretKey string `ini:"aws_secret_access_key"` AWSSessionToken string `ini:"aws_session_token"` AWSSecurityToken string `ini:"aws_security_token"` }
AWSCredentials represents the set of attributes used to authenticate to AWS with a short lived session
type CredentialsProvider ¶
CredentialsProvider loads aws credentials file
func NewSharedCredentials ¶
func NewSharedCredentials(profile string) *CredentialsProvider
NewSharedCredentials helper to create the credentials provider
func (*CredentialsProvider) CredsExists ¶
func (p *CredentialsProvider) CredsExists() (bool, error)
CredsExists verify that the credentials exist
func (*CredentialsProvider) Load ¶
func (p *CredentialsProvider) Load() (string, string, string, error)
Load load the aws credentials file
func (*CredentialsProvider) Save ¶
func (p *CredentialsProvider) Save(id, secret, token string) error
Save persist the credentials
Click to show internal directories.
Click to hide internal directories.