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) UseWorkspace(local bool, teamId string, teamMode string) error
- func (c *Config) WriteGlobalConfig() error
- func (c *Config) WriteLocalConfig() error
- type Profile
Constants ¶
const ColorAuto = "auto"
ColorAuto represents the auto-state for colors
const ColorOff = "off"
ColorOff represents the off-state for colors
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 ¶ added in v0.8.0
func (*Config) RemoveAllProfiles ¶
RemoveAllProfiles removes all the profiles from the config file.
func (*Config) UseWorkspace ¶ added in v0.8.0
UseWorkspace selects the active workspace to be used
func (*Config) WriteGlobalConfig ¶ added in v0.8.1
func (*Config) WriteLocalConfig ¶ added in v0.8.1
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