Documentation
¶
Index ¶
- func ClearContexts(app *config_domain.GDGAppConfiguration)
- func CopyContext(app *config_domain.GDGAppConfiguration, src, dest string)
- func CreateNewContext(app *config_domain.GDGAppConfiguration, name string)
- func DefaultConfig() string
- func DeleteContext(app *config_domain.GDGAppConfiguration, name string)
- func DeleteS3Config(app *config_domain.GDGAppConfiguration, name string)
- func InitTemplateConfig(override string) *config_domain.TemplatingConfig
- func ListS3Configs(app *config_domain.GDGAppConfiguration) map[string]map[string]string
- func NewConfig(override string, opts ...config_domain.GDGAppConfigurationOption) *config_domain.GDGAppConfiguration
- func NewCustomS3Config(app *config_domain.GDGAppConfiguration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearContexts ¶ added in v0.9.1
func ClearContexts(app *config_domain.GDGAppConfiguration)
ClearContexts resets all contexts to a single default example context and saves the config.
func CopyContext ¶ added in v0.9.1
func CopyContext(app *config_domain.GDGAppConfiguration, src, dest string)
CopyContext Makes a copy of the specified context and write to disk
func CreateNewContext ¶ added in v0.9.1
func CreateNewContext(app *config_domain.GDGAppConfiguration, name string)
CreateNewContext prompts the user to configure a new Grafana context with authentication, watched folders, connection filters, and credential rules. It builds the configuration, writes secure files, updates the internal context map, saves the config to disk, and logs completion.
func DefaultConfig ¶ added in v0.9.1
func DefaultConfig() string
func DeleteContext ¶ added in v0.9.1
func DeleteContext(app *config_domain.GDGAppConfiguration, name string)
DeleteContext remove a given context
func DeleteS3Config ¶ added in v0.9.3
func DeleteS3Config(app *config_domain.GDGAppConfiguration, name string)
DeleteS3Config removes a named storage engine from the config and cleans up its credentials file from the current context's secure location. It warns (but does not fail) if the engine is still referenced by an existing context.
func InitTemplateConfig ¶ added in v0.5.2
func InitTemplateConfig(override string) *config_domain.TemplatingConfig
InitTemplateConfig loads templating configuration from a file or defaults. It builds the search path, reads the config with Viper, and returns a populated *config_domain.TemplatingConfig instance.```
func ListS3Configs ¶ added in v0.9.3
func ListS3Configs(app *config_domain.GDGAppConfiguration) map[string]map[string]string
ListS3Configs returns all storage_engine entries from the config.
func NewConfig ¶ added in v0.9.3
func NewConfig(override string, opts ...config_domain.GDGAppConfigurationOption) *config_domain.GDGAppConfiguration
NewConfig initializes the global configuration from a file or defaults. It loads gdg.yml (or importer.yml) using Viper, updates context names, and stores the configuration in a global variable for later use.
func NewCustomS3Config ¶ added in v0.9.3
func NewCustomS3Config(app *config_domain.GDGAppConfiguration)
NewCustomS3Config runs a TUI wizard to configure a cloud storage engine. For managed providers (AWS S3, GCS, Azure) it prints the relevant docs URL and returns. For custom S3-compatible providers it collects config, writes credentials to the current context's secure location (matching the path GetCloudAuthLocation resolves), persists non-sensitive config to gdg.yml, and optionally assigns the storage engine to the active context.
Types ¶
This section is empty.