Documentation ¶
Index ¶
- Constants
- Variables
- func InitConfig(siteNameFromCommandLine string)
- func InitEnv()
- func IsValidColorMode() bool
- func ParseClusterIdentifier(aliasOrClusterID string) (string, error)
- func UpdateConfig(update func(config *Config, siteConfig *SiteConfig) error)
- type Aliases
- type Config
- type SiteConfig
- type VersionInfoAttributes
Constants ¶
View Source
const ( UnspecifiedSite = "default" DefaultSiteName = "default" DefaultCloudURL = "https://api.home.weka.io/" )
Variables ¶
View Source
var ( ConfigDir string ConfigFilePath string AliasesFilePath string CurrentConfig *Config CurrentSiteConfig *SiteConfig SiteName string )
View Source
var ( ColorMode string VerboseLogging bool )
View Source
var IsInteractiveTerminal bool
Functions ¶
func InitConfig ¶
func InitConfig(siteNameFromCommandLine string)
func IsValidColorMode ¶
func IsValidColorMode() bool
func ParseClusterIdentifier ¶
func UpdateConfig ¶
func UpdateConfig(update func(config *Config, siteConfig *SiteConfig) error)
UpdateConfig updates values in the configuration file. To update values specifically for the currently active site, use UpdateSiteConfig instead.
Types ¶
type Aliases ¶
type Aliases struct { FilePath string // contains filtered or unexported fields }
func NewAliases ¶
func NewAliases() *Aliases
type Config ¶
type Config struct { APIKey string `toml:"api_key,omitempty"` CloudURL string `toml:"cloud_url,omitempty"` DefaultSite string `toml:"default_site"` Sites map[string]*SiteConfig `toml:"sites"` }
Config holds all global CLI configuration values
type SiteConfig ¶
SiteConfig holds configuration values for a specific Weka Home site
type VersionInfoAttributes ¶
var VersionInfo VersionInfoAttributes
Click to show internal directories.
Click to hide internal directories.