完整的配置文件
| 32 | |
| 33 | // 完整的配置文件 |
| 34 | type DockerComposeYml struct { |
| 35 | Version string `yaml:"version"` // 版本号 |
| 36 | Services map[string]Service `yaml:"services"` // 服务配置 |
| 37 | Volumes map[string]Volume `yaml:"volumes,omitempty"` // 挂载卷配置 |
| 38 | Networks map[string]Network `yaml:"networks,omitempty"` // 网络配置 |
| 39 | Secrets map[string]YmlSecret `yaml:"secrets,omitempty"` // 密钥 |
| 40 | // TODO configs |
| 41 | // TODO Variable substitution |
| 42 | // TODO Extension fields |
| 43 | |
| 44 | //SmartIDE SmartIDE `yaml:"smartide,omitempty"` // 一些自定义的信息 |
| 45 | } |
| 46 | |
| 47 | func (c *DockerComposeYml) IsNil() bool { |
| 48 | return c.Version == "" && len(c.Services) == 0 && len(c.Volumes) == 0 && len(c.Networks) == 0 && len(c.Secrets) == 0 |
nothing calls this directly
no outgoing calls
no test coverage detected