@@ -535,6 +535,9 @@ func (m Mapping) Merge(o Mapping) Mapping {
535535 return m
536536}
537537
538+ // Options is a mapping type for options we pass as-is to container runtime
539+ type Options map [string ]string
540+
538541// Labels is a mapping type for labels
539542type Labels map [string ]string
540543
@@ -609,8 +612,8 @@ func (h HostsList) MarshalJSON() ([]byte, error) {
609612
610613// LoggingConfig the logging configuration for a service
611614type LoggingConfig struct {
612- Driver string `yaml:"driver,omitempty" json:"driver,omitempty"`
613- Options map [ string ] string `yaml:"options,omitempty" json:"options,omitempty"`
615+ Driver string `yaml:"driver,omitempty" json:"driver,omitempty"`
616+ Options Options `yaml:"options,omitempty" json:"options,omitempty"`
614617
615618 Extensions Extensions `yaml:"#extensions,inline" json:"-"`
616619}
@@ -955,16 +958,16 @@ func (u *UlimitsConfig) MarshalJSON() ([]byte, error) {
955958
956959// NetworkConfig for a network
957960type NetworkConfig struct {
958- Name string `yaml:"name,omitempty" json:"name,omitempty"`
959- Driver string `yaml:"driver,omitempty" json:"driver,omitempty"`
960- DriverOpts map [ string ] string `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
961- Ipam IPAMConfig `yaml:"ipam,omitempty" json:"ipam,omitempty"`
962- External External `yaml:"external,omitempty" json:"external,omitempty"`
963- Internal bool `yaml:"internal,omitempty" json:"internal,omitempty"`
964- Attachable bool `yaml:"attachable,omitempty" json:"attachable,omitempty"`
965- Labels Labels `yaml:"labels,omitempty" json:"labels,omitempty"`
966- EnableIPv6 bool `yaml:"enable_ipv6,omitempty" json:"enable_ipv6,omitempty"`
967- Extensions Extensions `yaml:"#extensions,inline" json:"-"`
961+ Name string `yaml:"name,omitempty" json:"name,omitempty"`
962+ Driver string `yaml:"driver,omitempty" json:"driver,omitempty"`
963+ DriverOpts Options `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
964+ Ipam IPAMConfig `yaml:"ipam,omitempty" json:"ipam,omitempty"`
965+ External External `yaml:"external,omitempty" json:"external,omitempty"`
966+ Internal bool `yaml:"internal,omitempty" json:"internal,omitempty"`
967+ Attachable bool `yaml:"attachable,omitempty" json:"attachable,omitempty"`
968+ Labels Labels `yaml:"labels,omitempty" json:"labels,omitempty"`
969+ EnableIPv6 bool `yaml:"enable_ipv6,omitempty" json:"enable_ipv6,omitempty"`
970+ Extensions Extensions `yaml:"#extensions,inline" json:"-"`
968971}
969972
970973// IPAMConfig for a network
@@ -979,18 +982,18 @@ type IPAMPool struct {
979982 Subnet string `yaml:"subnet,omitempty" json:"subnet,omitempty"`
980983 Gateway string `yaml:"gateway,omitempty" json:"gateway,omitempty"`
981984 IPRange string `yaml:"ip_range,omitempty" json:"ip_range,omitempty"`
982- AuxiliaryAddresses map [ string ] string `yaml:"aux_addresses,omitempty" json:"aux_addresses,omitempty"`
985+ AuxiliaryAddresses Mapping `yaml:"aux_addresses,omitempty" json:"aux_addresses,omitempty"`
983986 Extensions map [string ]interface {} `yaml:",inline" json:"-"`
984987}
985988
986989// VolumeConfig for a volume
987990type VolumeConfig struct {
988- Name string `yaml:"name,omitempty" json:"name,omitempty"`
989- Driver string `yaml:"driver,omitempty" json:"driver,omitempty"`
990- DriverOpts map [ string ] string `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
991- External External `yaml:"external,omitempty" json:"external,omitempty"`
992- Labels Labels `yaml:"labels,omitempty" json:"labels,omitempty"`
993- Extensions Extensions `yaml:"#extensions,inline" json:"-"`
991+ Name string `yaml:"name,omitempty" json:"name,omitempty"`
992+ Driver string `yaml:"driver,omitempty" json:"driver,omitempty"`
993+ DriverOpts Options `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
994+ External External `yaml:"external,omitempty" json:"external,omitempty"`
995+ Labels Labels `yaml:"labels,omitempty" json:"labels,omitempty"`
996+ Extensions Extensions `yaml:"#extensions,inline" json:"-"`
994997}
995998
996999// External identifies a Volume or Network as a reference to a resource that is
0 commit comments