{"modulePath":"github.com/hookdeck/hookdeck-cli","version":"v1.9.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Constants\n\n```go\nconst ColorAuto = \"auto\"\n```\nColorAuto represents the auto-state for colors\n\n```go\nconst ColorOff = \"off\"\n```\nColorOff represents the off-state for colors\n\n```go\nconst ColorOn = \"on\"\n```\nColorOn represnets the on-state for colors\n\n## Types\n\n```go\ntype Config struct {\n\tProfile    Profile\n\tColor      string\n\tLogLevel   string\n\tDeviceName string\n\n\t// Helpers\n\tAPIBaseURL       string\n\tDashboardBaseURL string\n\tConsoleBaseURL   string\n\tWSBaseURL        string\n\tInsecure         bool\n\n\t// Config\n\tConfigFileFlag string // flag -- should NOT use this directly\n\t// contains filtered or unexported fields\n}\n```\nConfig handles all overall configuration for the CLI\n\n```go\nfunc (c *Config) FileExists(path string) (bool, error)\n```\nFileExists checks if a file exists at the given path\n\n```go\nfunc (c *Config) GetAPIClient() *hookdeck.Client\n```\nGetAPIClient returns the internal API client instance\n\n```go\nfunc (c *Config) GetClient() *hookdeckclient.Client\n```\n\n```go\nfunc (c *Config) GetConfigFile() string\n```\nGetConfigFile returns the path of the currently loaded config file\n\n```go\nfunc (c *Config) InitConfig()\n```\nInitConfig reads in profiles file and ENV variables if set.\n\n```go\nfunc (c *Config) ListProfiles() []string\n```\n\n```go\nfunc (c *Config) RemoveAllProfiles() error\n```\nRemoveAllProfiles removes all the profiles from the config file. TODO: consider adding log to clarify which config file is being used\n\n```go\nfunc (c *Config) UseProject(projectId string, projectMode string) error\n```\nUseProject selects the active project to be used\n\n```go\nfunc (c *Config) UseProjectLocal(projectId string, projectMode string) (bool, error)\n```\nUseProjectLocal selects the active project to be used in local config Returns true if a new file was created, false if existing file was updated\n\n```go\ntype ConfigFS interface {\n\t// contains filtered or unexported methods\n}\n```\n\n```go\ntype Profile struct {\n\tName        string // profile name\n\tAPIKey      string\n\tProjectId   string\n\tProjectMode string\n\tGuestURL    string // URL to create permanent account for guest users\n\n\tConfig *Config\n}\n```\n\n```go\nfunc (p *Profile) RemoveProfile() error\n```\n\n```go\nfunc (p *Profile) SaveProfile() error\n```\n\n```go\nfunc (p *Profile) UseProfile() error\n```\n\n```go\nfunc (p *Profile) ValidateAPIKey() error\n```\n\n","path":"github.com/hookdeck/hookdeck-cli/pkg/config","name":"config","synopsis":"","isRedistributable":true}
