config

package
v0.1.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvVarAWSConfigFile            = "AWS_CONFIG_FILE"
	EnvVarAWSSharedCredentialsFile = "AWS_SHARED_CREDENTIALS_FILE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func Load

func Load() (*Config, error)

func (*Config) Profile

func (c *Config) Profile(name string) (*User, *Role, *Session, *Federate, error)

Profile finds the named profile, and returns only one of either: User - Contains credentials. Role - Describes how to derive credentials using assume-role. Session - Describes how to derive credentials using get-session-token. Federate - Describes how to derive credentials using get-federation-token. In the event that the named profile does not exist (or is otherwise misconfigured), an error is returned.

type Federate

type Federate struct {
	DurationSeconds int
	SourceProfile   string
	Name            string
	Policy          string
	PolicyARNs      []string
}

type Role

type Role struct {
	DurationSeconds int
	ExternalID      string
	MFAMessage      string
	MFASerial       string
	Policy          string
	PolicyARNs      []string
	RoleARN         string
	RoleSessionName string
	SourceProfile   string
	YubikeySlot     string
}

type Session

type Session struct {
	DurationSeconds int
	MFAMessage      string
	MFASerial       string
	SourceProfile   string
	YubikeySlot     string
}

type User

type User struct {
	AWSAccessKeyID     string
	AWSSecretAccessKey string
	AWSSessionToken    string
}

Jump to

Keyboard shortcuts

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