fixing regex, ready for tests

This commit is contained in:
2025-11-11 13:33:14 -05:00
parent 09b33762ec
commit a0e397a87f
4 changed files with 105 additions and 99 deletions

26
compose/compose.go Normal file
View File

@@ -0,0 +1,26 @@
package compose
type RestartConfig struct {
Condition *string `yaml:"condition"`
Delay *string `yaml:"delay"`
MaxAttempts *int `yaml:"max_attempts"`
Window *string `yaml:"window"`
}
type DeployConfig struct {
Policy *RestartConfig `yaml:"restart_policy"`
}
type ServiceConfig struct {
MemLimit *string `yaml:"mem_limit"`
Cpus *float64 `yaml:"cpus"`
Ports *[]string `yaml:"ports"`
User *string `yaml:"user"`
Deploy *DeployConfig `yaml:"deploy"`
SecOpts *[]string `yaml:"security_opt"`
Privileged *bool `yaml:"privileged"`
}
type Compose struct {
Services map[string]ServiceConfig `yaml:"services"`
}