Documentation ¶
Index ¶
Constants ¶
View Source
const ConfigFileSource = "Configuration file"
ConfigFileSource indicates the credentials are retrieved from configuration file.
View Source
const EnvSource = "Environment variables"
EnvSource indicates the credentials are retrieved from environment variables.
Variables ¶
View Source
var DefaultCredsPath = ""
DefaultCredsPath returns the default location of the credentials file. It's under the user's home directory, if defined, otherwise under the current working directory.
Functions ¶
func FromEnv ¶
func FromEnv() iam.Credentials
FromEnv reads the credentials from the user environment.
func FromFile ¶
func FromFile() iam.Credentials
FromFile reads the credentials that stored in the default file location.
func Get ¶
func Get() iam.Credentials
Get returns the configured credentials. Effectively a convenience wrapper around FromEnv, followed by a call to FromFile.
The lookup order is:
- Environment variables (see FromEnv)
- Credentials file (see FromFile)
func ToFile ¶ added in v0.37.0
func ToFile(c iam.Credentials) error
ToFile stores the provided credentials in the default file location.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.