Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// CurrentProfile is the name of the active profile
CurrentProfile string `json:"current_profile,omitempty"`
// Profiles maps profile names to their configuration
Profiles map[string]*Profile `json:"profiles,omitempty"`
// Legacy fields for backward compatibility
Token string `json:"token,omitempty"`
WorkspaceName string `json:"workspace_name,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
BotID string `json:"bot_id,omitempty"`
}
Config holds the CLI configuration with support for multiple profiles.
func (*Config) GetCurrentProfile ¶
GetCurrentProfile returns the current profile configuration. It handles migration from legacy single-token format.
func (*Config) GetProfile ¶
GetProfile returns a specific profile by name, or nil if not found.
func (*Config) ListProfiles ¶
ListProfiles returns a sorted list of profile names.
func (*Config) MigrateToProfiles ¶
func (c *Config) MigrateToProfiles()
MigrateToProfiles migrates legacy single-token config to profiles format.
func (*Config) SetProfile ¶
SetProfile sets or updates a profile in the config.
Click to show internal directories.
Click to hide internal directories.