Documentation ¶
Index ¶
- func AwsConfigFile(accountName string, region string) string
- func AwsConfigFileRead() string
- func AwsCredentialsFile(accountName string, accessKeyID string, secretAccessKey string, ...) string
- func AwsCredsFileRead() string
- func AwsReplaceBlock(file string, accountName string) string
- func AwsSingleReplaceBlock(file string, accountName string) string
- func CacheFileExists() bool
- func CacheFileRead() string
- func CheckAccountLocally(account string) string
- func CheckAndReturnError(err error)
- func CheckConfigFile(path string) bool
- func CommandExists(command string)
- func ConfigFileResultString(field string) string
- func GetHomeDirectory() string
- func GetLatestRequestedTime(content string) string
- func TemplateCacheFile(accountName string, accountID int, accountRole []string, ...) string
- func TemplateConfigFile() string
- type CacheFields
- type GeneralParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwsConfigFile ¶
marshalls data into a string
func AwsCredentialsFile ¶
func AwsCredentialsFile(accountName string, accessKeyID string, secretAccessKey string, sessionToken string) string
marshalls data into a string
func AwsReplaceBlock ¶
removes from a file all text in between two strings
func AwsSingleReplaceBlock ¶ added in v0.1.5
returns only the text entry which statisfies the accountName
func CheckAccountLocally ¶ added in v0.1.5
check if an account is present on the local aws credentials/config files
func CheckAndReturnError ¶
func CheckAndReturnError(err error)
checks the error, if the error contains a message, stop the execution and show the error to the user
func CommandExists ¶
func CommandExists(command string)
check if a command exists on the host machine
func ConfigFileResultString ¶
parses letme-config file and returns one field at a time
func GetLatestRequestedTime ¶ added in v0.1.5
return the latest requested time from a block of text
func TemplateCacheFile ¶
func TemplateCacheFile(accountName string, accountID int, accountRole []string, accountRegion []string) string
marshalls data into a toml file (.letme-cache)
func TemplateConfigFile ¶
func TemplateConfigFile() string
marshalls data into a toml file (config-file)
Types ¶
type CacheFields ¶
type CacheFields struct { Id int `toml:"id"` Name string `toml:"name"` Role []string `toml:"role"` Region []string `toml:"region"` }
struct which represents the cache file toml keys
func ParseCacheFile ¶
func ParseCacheFile(account string) CacheFields
maps data from the cache file into a struct