awsconfig

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 6 Imported by: 81

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

type CredentialsProvider struct {
	Filename string
	Profile  string
}

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

Jump to

Keyboard shortcuts

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