Marc Cataford
5a18a5bf44
All checks were successful
Pull-Request / tests (pull_request) Successful in 1m6s
Pull-Request / static-analysis (pull_request) Successful in 1m31s
Pull-Request / post-run (pull_request) Successful in 24s
Push / pre-run (push) Successful in 28s
Push / tests (push) Successful in 1m3s
Push / static-analysis (push) Successful in 1m29s
Push / post-run (push) Successful in 38s
docs: add documentation to core functions and structs
45 lines
1.2 KiB
Go
45 lines
1.2 KiB
Go
package service_definition
|
|
|
|
type BuildImage struct {
|
|
Path string `yaml:"path"`
|
|
TagPrefix string `yaml:"tag"`
|
|
}
|
|
|
|
type BuildConfiguration struct {
|
|
Images []BuildImage
|
|
}
|
|
|
|
type VolumeDefinition struct {
|
|
Name string `yaml:"name"`
|
|
}
|
|
|
|
type PortMapping struct {
|
|
Host string `yaml:"host"`
|
|
Container string `yaml:"container"`
|
|
Type string `yaml:"type"`
|
|
}
|
|
|
|
type VolumeConfiguration struct {
|
|
Name string `yaml:"name"`
|
|
Container string `yaml:"container"`
|
|
Host string `yaml:"host"`
|
|
ReadOnly bool `yaml:"readonly"`
|
|
}
|
|
|
|
type ContainerDefinition struct {
|
|
Name string `yaml:"name"`
|
|
Image string `yaml:"image"`
|
|
Volumes []VolumeConfiguration `yaml:"volumes"`
|
|
EnvFile string `yaml:"env-file"`
|
|
Network string `yaml:"network"`
|
|
PIDNamespace string `yaml:"pid-namespace"`
|
|
ExtraArgs []string `yaml:"extra-args"`
|
|
}
|
|
|
|
type ServiceDefinition struct {
|
|
Name string `yaml:"name"`
|
|
Build BuildConfiguration `yaml:"build"`
|
|
Volumes []VolumeDefinition `yaml:"volumes"`
|
|
Containers []ContainerDefinition `yaml:"containers"`
|
|
Ports []PortMapping `yaml:"ports"`
|
|
}
|