@@ -7,16 +7,29 @@ import (
7
7
8
8
var waitGroup sync.WaitGroup
9
9
10
- type Filter struct {
11
- // Exclude as strings (regexp)
12
- Exclude []string `yaml:"exclude"`
13
- // compiled regexp excludes
14
- excludeRegexp []* regexp.Regexp
10
+ type SyncConfig struct {
11
+ // Sync (remote -> local) configurations
12
+ Sync map [string ]Server `yaml:"sync"`
13
+ // Deploy (local -> remote) configurations
14
+ Deploy map [string ]Server `yaml:"deploy"`
15
+ }
15
16
16
- // Includes as strings (regexp)
17
- Include []string `yaml:"include"`
18
- // compiled regexp includes
19
- includeRegexp []* regexp.Regexp
17
+ type Server struct {
18
+ // General working path (for filesystem syncs)
19
+ Path string `yaml:"path"`
20
+ // General connection (default for all remote connections)
21
+ Connection * YamlCommandBuilderConnection `yaml:"connection"`
22
+ // Filesystem sync list
23
+ Filesystem []Filesystem `yaml:"filesystem"`
24
+ // Database sync list
25
+ Database []Database `yaml:"database"`
26
+ // Startup execution list (executed before sync)
27
+ ExecStartup []Execution `yaml:"exec-startup"`
28
+ // Finish execution list (executed after sync)
29
+ ExecFinish []Execution `yaml:"exec-finish"`
30
+
31
+ // Runtime configuration (not part of configuration)
32
+ runConfiguration * RunConfiguration
20
33
}
21
34
22
35
type Filesystem struct {
@@ -34,26 +47,6 @@ type Filesystem struct {
34
47
} `yaml:"options"`
35
48
}
36
49
37
- type DatabaseOptions struct {
38
- // Clear database with DROP/CREATE before sync
39
- ClearDatabase bool `yaml:"clear-database"`
40
- // Arguments for mysqldump command
41
- Mysqldump * YamlStringArray `yaml:"mysqldump"`
42
- // Arguments for mysql command
43
- Mysql * YamlStringArray `yaml:"mysql"`
44
- // Arguments for pgdump command
45
- Pgdump * YamlStringArray `yaml:"pgdump"`
46
- // Arguments for psql command
47
- Psql * YamlStringArray `yaml:"psql"`
48
- }
49
-
50
- type EnvironmentVar struct {
51
- // Name of variable
52
- Name string `yaml:"name"`
53
- // Value of variable
54
- Value string `yaml:"value"`
55
- }
56
-
57
50
type Database struct {
58
51
// Type of database (either mysql or postgres)
59
52
Type string `yaml:"type"`
@@ -116,28 +109,36 @@ type Execution struct {
116
109
} `yaml:"options"`
117
110
}
118
111
119
- type Server struct {
120
- // General working path (for filesystem syncs)
121
- Path string `yaml:"path"`
122
- // General connection (default for all remote connections)
123
- Connection * YamlCommandBuilderConnection `yaml:"connection"`
124
- // Filesystem sync list
125
- Filesystem []Filesystem `yaml:"filesystem"`
126
- // Database sync list
127
- Database []Database `yaml:"database"`
128
- // Startup execution list (executed before sync)
129
- ExecStartup []Execution `yaml:"exec-startup"`
130
- // Finish execution list (executed after sync)
131
- ExecFinish []Execution `yaml:"exec-finish"`
112
+ type Filter struct {
113
+ // Exclude as strings (regexp)
114
+ Exclude []string `yaml:"exclude"`
115
+ // compiled regexp excludes
116
+ excludeRegexp []* regexp.Regexp
132
117
133
- runConfiguration * RunConfiguration
118
+ // Includes as strings (regexp)
119
+ Include []string `yaml:"include"`
120
+ // compiled regexp includes
121
+ includeRegexp []* regexp.Regexp
134
122
}
135
123
136
- type SyncConfig struct {
137
- // Sync (remote -> local) configurations
138
- Sync map [string ]Server `yaml:"sync"`
139
- // Deploy (local -> remote) configurations
140
- Deploy map [string ]Server `yaml:"deploy"`
124
+ type DatabaseOptions struct {
125
+ // Clear database with DROP/CREATE before sync
126
+ ClearDatabase bool `yaml:"clear-database"`
127
+ // Arguments for mysqldump command
128
+ Mysqldump * YamlStringArray `yaml:"mysqldump"`
129
+ // Arguments for mysql command
130
+ Mysql * YamlStringArray `yaml:"mysql"`
131
+ // Arguments for pgdump command
132
+ Pgdump * YamlStringArray `yaml:"pgdump"`
133
+ // Arguments for psql command
134
+ Psql * YamlStringArray `yaml:"psql"`
135
+ }
136
+
137
+ type EnvironmentVar struct {
138
+ // Name of variable
139
+ Name string `yaml:"name"`
140
+ // Value of variable
141
+ Value string `yaml:"value"`
141
142
}
142
143
143
144
type RunConfiguration struct {
0 commit comments