Documentation
¶
Index ¶
- Constants
- type Config
- func (c *Config) EditConfig() error
- func (c *Config) GetConfigFolder(xdgPath string) string
- func (c *Config) InitConfig()
- func (c *Config) ListProfiles() []string
- func (c *Config) RemoveAllProfiles() error
- func (c *Config) SaveLocalConfig() error
- func (c *Config) UseWorkspace(local bool, teamId string, teamMode string) error
- type Profile
Constants ¶
View Source
const ColorAuto = "auto"
ColorAuto represents the auto-state for colors
View Source
const ColorOff = "off"
ColorOff represents the off-state for colors
View Source
const ColorOn = "on"
ColorOn represnets the on-state for colors
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Profile Profile
Color string
LogLevel string
DeviceName string
// Helpers
APIBaseURL string
DashboardBaseURL string
ConsoleBaseURL string
WSBaseURL string
Insecure bool
// Config
GlobalConfigFile string
GlobalConfig *viper.Viper
LocalConfigFile string
LocalConfig *viper.Viper
}
Config handles all overall configuration for the CLI
func (*Config) EditConfig ¶
EditConfig opens the configuration file in the default editor.
func (*Config) GetConfigFolder ¶
GetConfigFolder retrieves the folder where the profiles file is stored It searches for the xdg environment path first and will secondarily place it in the home directory
func (*Config) InitConfig ¶
func (c *Config) InitConfig()
InitConfig reads in profiles file and ENV variables if set.
func (*Config) ListProfiles ¶
func (*Config) RemoveAllProfiles ¶
RemoveAllProfiles removes all the profiles from the config file.
func (*Config) SaveLocalConfig ¶ added in v0.8.0
type Profile ¶
type Profile struct {
Name string // profile name
APIKey string
TeamID string
TeamMode string
Config *Config
}
func (*Profile) GetConfigField ¶
GetConfigField returns the configuration field for the specific profile
func (*Profile) RemoveProfile ¶
func (*Profile) SaveProfile ¶
func (*Profile) UseProfile ¶
func (*Profile) ValidateAPIKey ¶
Click to show internal directories.
Click to hide internal directories.