Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigFileName is the name of the config files (home / project) ConfigFileName = "settings" // ConfigFileType is the config file extension ConfigFileType = "yaml" // ConfigFileNameWithExt is the config filename with extension ConfigFileNameWithExt = fmt.Sprintf("%s.%s", ConfigFileName, ConfigFileType) // HomePath is the path to a users home directory HomePath, _ = fileutil.GetHomeDir() // HomeConfigFile is the global config file HomeConfigFile = filepath.Join(HomePath, ConfigFileNameWithExt) // WorkingPath is the path to the working directory WorkingPath, _ = fileutil.GetWorkingDir() )
Functions ¶
func AddConnections ¶
func AddConnections(id string)
AddConnections is a function to add Connections from settings.yaml
func AddVariables ¶
func AddVariables(id string)
AddVariables is a function to add Variables from settings.yaml
func ConfigSettings ¶
func ConfigSettings(id string)
ConfigSettings is the main builder of the settings package
Types ¶
type Airflow ¶
type Airflow struct { Connections `mapstructure:"connections"` Pools `mapstructure:"pools"` Variables `mapstructure:"variables"` }
Airflow contains structure of airflow settings
type Config ¶
type Config struct {
Airflow `mapstructure:"airflow"`
}
Config is input data to generate connections, pools, and variables
type Connections ¶
type Connections []struct { ConnID string `mapstructure:"conn_id"` ConnType string `mapstructure:"conn_type"` ConnHost string `mapstructure:"conn_host"` ConnSchema string `mapstructure:"conn_schema"` ConnLogin string `mapstructure:"conn_login"` ConnPassword string `mapstructure:"conn_password"` ConnPort int `mapstructure:"conn_port"` ConnURI string `mapstructure:"conn_uri"` ConnExtra string `mapstructure:"conn_extra"` }
Connections contains structure of airflow connections
Click to show internal directories.
Click to hide internal directories.