github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/api/types/versions/v1p20/types.go (about)

     1  // Package v1p20 provides specific API types for the API version 1, patch 20.
     2  package v1p20
     3  
     4  import (
     5  	"github.com/docker/docker/api/types"
     6  	"github.com/docker/docker/api/types/container"
     7  	"github.com/docker/go-connections/nat"
     8  )
     9  
    10  // ContainerJSON is a backcompatibility struct for the API 1.20
    11  type ContainerJSON struct {
    12  	*types.ContainerJSONBase
    13  	Mounts          []types.MountPoint
    14  	Config          *ContainerConfig
    15  	NetworkSettings *NetworkSettings
    16  }
    17  
    18  // ContainerConfig is a backcompatibility struct used in ContainerJSON for the API 1.20
    19  type ContainerConfig struct {
    20  	*container.Config
    21  
    22  	MacAddress      string
    23  	NetworkDisabled bool
    24  	ExposedPorts    map[nat.Port]struct{}
    25  
    26  	// backward compatibility, they now live in HostConfig
    27  	VolumeDriver string
    28  }
    29  
    30  // StatsJSON is a backcompatibility struct used in Stats for APIs prior to 1.21
    31  type StatsJSON struct {
    32  	types.Stats
    33  	Network types.NetworkStats `json:"network,omitempty"`
    34  }
    35  
    36  // NetworkSettings is a backward compatible struct for APIs prior to 1.21
    37  type NetworkSettings struct {
    38  	types.NetworkSettingsBase
    39  	types.DefaultNetworkSettings
    40  }