Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EnvConfig = fromConfigFiles()
Functions ¶
func LoadConfig ¶
LoadConfig returns configuration data when it can be read. It retains the historical best-effort behavior; callers that must distinguish a missing default from a broken explicit file should use LoadConfigFile.
func LoadConfigFile ¶ added in v0.7.0
LoadConfigFile loads configuration data and reports path and read failures. A missing implicit home-directory configuration is not an error.
Types ¶
type CatalogConfig ¶
type CatalogConfig struct {
CatalogType string `yaml:"type"`
URI string `yaml:"uri"`
Output string `yaml:"output"`
Credential string `yaml:"credential"`
Warehouse string `yaml:"warehouse"`
AwsProfile string `yaml:"aws-profile"`
SQLDriver string `yaml:"sql-driver"`
SQLDialect string `yaml:"sql-dialect"`
RestOptions *RestOptions `yaml:"rest,omitempty"`
}
func ParseConfig ¶
func ParseConfig(file []byte, catalogName string) (*CatalogConfig, error)
ParseConfig unmarshals the config file once and resolves the catalog to use. When catalogName is empty, it falls back to the file's default-catalog field and then to the built-in "default" name. It returns the matching CatalogConfig, or nil/nil if no such catalog is defined in the file. A non-nil error means the file could not be parsed and should be surfaced to the user.
type Config ¶
type Config struct {
DefaultCatalog string `yaml:"default-catalog"`
Catalogs map[string]CatalogConfig `yaml:"catalog"`
MaxWorkers int `yaml:"max-workers"`
}