Documentation
¶
Index ¶
- func ConfigDir() string
- func ConfigPath() string
- func Save(cfg Config) error
- func SaveAutoDetected(accounts []core.AccountConfig) error
- func SaveAutoDetectedTo(path string, accounts []core.AccountConfig) error
- func SaveDashboardProviders(providers []DashboardProviderConfig) error
- func SaveDashboardProvidersTo(path string, providers []DashboardProviderConfig) error
- func SaveTheme(theme string) error
- func SaveThemeTo(path string, theme string) error
- func SaveTo(path string, cfg Config) error
- type Config
- type DashboardConfig
- type DashboardProviderConfig
- type ExperimentalConfig
- type UIConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
func ConfigPath() string
func SaveAutoDetected ¶
func SaveAutoDetected(accounts []core.AccountConfig) error
SaveAutoDetected persists auto-detected accounts into the config file (read-modify-write).
func SaveAutoDetectedTo ¶
func SaveAutoDetectedTo(path string, accounts []core.AccountConfig) error
func SaveDashboardProviders ¶
func SaveDashboardProviders(providers []DashboardProviderConfig) error
SaveDashboardProviders persists dashboard provider preferences into the config file (read-modify-write).
func SaveDashboardProvidersTo ¶
func SaveDashboardProvidersTo(path string, providers []DashboardProviderConfig) error
func SaveThemeTo ¶
Types ¶
type Config ¶
type Config struct {
UI UIConfig `json:"ui"`
Theme string `json:"theme"`
Experimental ExperimentalConfig `json:"experimental"`
Dashboard DashboardConfig `json:"dashboard"`
AutoDetect bool `json:"auto_detect"`
Accounts []core.AccountConfig `json:"accounts"`
AutoDetectedAccounts []core.AccountConfig `json:"auto_detected_accounts"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type DashboardConfig ¶
type DashboardConfig struct {
Providers []DashboardProviderConfig `json:"providers"`
}
type DashboardProviderConfig ¶
type DashboardProviderConfig struct {
AccountID string `json:"account_id"`
Enabled bool `json:"enabled"`
}
func (*DashboardProviderConfig) UnmarshalJSON ¶
func (p *DashboardProviderConfig) UnmarshalJSON(data []byte) error
type ExperimentalConfig ¶
type ExperimentalConfig struct {
Analytics bool `json:"analytics"`
}
Click to show internal directories.
Click to hide internal directories.