-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstructs.go
More file actions
37 lines (33 loc) · 1.47 KB
/
structs.go
File metadata and controls
37 lines (33 loc) · 1.47 KB
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
package main
type Service struct {
Name string `json:"name"`
Path string `json:"path"`
Command string `json:"command"`
// Env is a map of environment iables to set for the command. which can be nil.
Env map[string]interface{} `json:"env"` // optional environment variables to set
}
type Docker struct {
// Name is the name of the container
Name string `json:"name"`
// Image is the name of the image to use for the container
Image string `json:"image"`
// Command is the command to run in the container
Command string `json:"command"`
// Env is a map of environment iables to set for the command. which can be nil.
Env map[string]interface{} `json:"env"` // optional environment variables to set
Compose bool `json:"compose"`
}
type TOMLRead struct {
Version string `toml:"version"`
Services map[string]Service `toml:"services"`
Containers map[string]Docker `toml:"containers"`
Environment map[string]interface{} `toml:"environment"`
GlobalEnv []string // this will be set by the program and not by the config file
} // this struct is used to read the config file
type TOML struct {
Version string `toml:"version"`
Services []Service `toml:"services"`
Docker []Docker `toml:"docker"`
Environment map[string]interface{} `toml:"environment"`
GlobalEnv []string // this will be set by the program and not by the config fileş
}