-
Notifications
You must be signed in to change notification settings - Fork 67
/
types.go
39 lines (34 loc) · 1.25 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package settings
// Connections contains structure of airflow 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"`
}
// Pools contains structure of airflow pools
type Pools []struct {
PoolName string `mapstructure:"pool_name"`
PoolSlot int `mapstructure:"pool_slot"`
PoolDescription string `mapstructure:"pool_description"`
}
// Variables contains structure of airflow variables
type Variables []struct {
VariableName string `mapstructure:"variable_name"`
VariableValue string `mapstructure:"variable_value"`
}
// Airflow contains structure of airflow settings
type Airflow struct {
Connections `mapstructure:"connections"`
Pools `mapstructure:"pools"`
Variables `mapstructure:"variables"`
}
// Config is input data to generate connections, pools, and variables
type Config struct {
Airflow `mapstructure:"airflow"`
}