Documentation ¶
Index ¶
- Variables
- func CredentialsNeedRefresh(creds *credentials.Credentials, refreshWindowMinutes int) bool
- func LoadCredentialsFromFile(filePath string) (*credentials.Credentials, error)
- func ReadGobFromFile(filePath string, object interface{}) error
- func WriteGobToFile(filePath string, object interface{}) error
- type Config
- type RoleConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool
Debug - Package variable for extra logging
View Source
var Verbose bool
Verbose - Package variable for extra logging
Functions ¶
func CredentialsNeedRefresh ¶
func CredentialsNeedRefresh(creds *credentials.Credentials, refreshWindowMinutes int) bool
CredentialsNeedRefresh - Calculates whether tokens need to be refreshed, based on existence, or if time.Now() is within refreshWindowMinutes of expiry.
func LoadCredentialsFromFile ¶
func LoadCredentialsFromFile(filePath string) (*credentials.Credentials, error)
LoadCredentialsFromFile - Attempts to load existing credentials from file.
func ReadGobFromFile ¶
ReadGobFromFile - Reads a gob-encoded interface from file.
func WriteGobToFile ¶
WriteGobToFile - Writes a gob-encoded interface to file.
Types ¶
type Config ¶
type Config struct { DefaultProfile string `yaml:"default_profile"` MFASerial string `yaml:"mfa_serial"` Roles []RoleConfig `yaml:"roles"` }
Config represents the config file.
func (*Config) GetDefaultRole ¶ added in v0.0.6
func (c *Config) GetDefaultRole() *RoleConfig
GetDefaultRole returns the first role flagged as default.
func (*Config) GetRole ¶
func (c *Config) GetRole(searchString string) *RoleConfig
GetRole Returns a RoleConfig.
Click to show internal directories.
Click to hide internal directories.