credentials

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2017 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package credentials provides the ability to parse and represent an AWS credentials file.

Index

Constants

View Source
const (
	// AccessKeyEnv is the name of the AWS access key environment variable.
	AccessKeyEnv = "AWS_ACCESS_KEY_ID"

	// SecretKeyEnv is the name of the AWS secret key environment variable.
	SecretKeyEnv = "AWS_SECRET_ACCESS_KEY"
)

Variables

This section is empty.

Functions

func Env

func Env() (string, string)

Env returns the current access and secret key evironment variables.

Types

type Profile

type Profile struct {
	Name      string
	AccessKey string
	SecretKey string
}

Profile represents an AWS profile.

func Parse

func Parse() ([]Profile, error)

Parse reads and parses the default aws credentials file, and returns the profiles it contains.

func (*Profile) IsActive

func (p *Profile) IsActive() bool

IsActive returns true of this profile matches the current access/secret key environment variables.

func (*Profile) String

func (p *Profile) String() string

Jump to

Keyboard shortcuts

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