vault

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialsFile

type CredentialsFile struct {
	Path string
	// contains filtered or unexported fields
}

CredentialsFile is an abstraction over what is in ~/.aws/credentials

func LoadCredentials

func LoadCredentials(path string) (*CredentialsFile, error)

LoadCredentials loads and parses a credential file. No error is returned if the file doesn't exist

func LoadCredentialsFromEnv

func LoadCredentialsFromEnv() (*CredentialsFile, error)

LoadCredentialsFromEnv finds the credential file from the environment

func (*CredentialsFile) ProfileNames

func (c *CredentialsFile) ProfileNames() []string

ProfileNames returns a slice of profile names from the AWS credentials

func (*CredentialsFile) ProfileSection

func (c *CredentialsFile) ProfileSection(name string) (ProfileSection, bool)

ProfileSection returns the profile section with the matching name. If there isn't any, an empty profile with the provided name is returned, along with false.

func (*CredentialsFile) ProfileSections

func (c *CredentialsFile) ProfileSections() []ProfileSection

ProfileSections returns all the profile sections in the credentials

type ProfileSection

type ProfileSection struct {
	Name string `ini:"-"`
}

ProfileSection is a profile section of the credentials file

Jump to

Keyboard shortcuts

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