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
Click to show internal directories.
Click to hide internal directories.