mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
dcc50e1d59
Signed-off-by: Lei Jitang <leijitang@huawei.com>
158 lines
3.6 KiB
Go
158 lines
3.6 KiB
Go
package types
|
|
|
|
import "github.com/docker/docker/pkg/version"
|
|
|
|
// ContainerCreateResponse contains the information returned to a client on the
|
|
// creation of a new container.
|
|
type ContainerCreateResponse struct {
|
|
// ID is the ID of the created container.
|
|
ID string `json:"Id"`
|
|
|
|
// Warnings are any warnings encountered during the creation of the container.
|
|
Warnings []string `json:"Warnings"`
|
|
}
|
|
|
|
// POST /containers/{name:.*}/exec
|
|
type ContainerExecCreateResponse struct {
|
|
// ID is the exec ID.
|
|
ID string `json:"Id"`
|
|
|
|
// Warnings are any warnings encountered during the execution of the command.
|
|
Warnings []string `json:"Warnings"`
|
|
}
|
|
|
|
// POST /auth
|
|
type AuthResponse struct {
|
|
// Status is the authentication status
|
|
Status string `json:"Status"`
|
|
}
|
|
|
|
// POST "/containers/"+containerID+"/wait"
|
|
type ContainerWaitResponse struct {
|
|
// StatusCode is the status code of the wait job
|
|
StatusCode int `json:"StatusCode"`
|
|
}
|
|
|
|
// POST "/commit?container="+containerID
|
|
type ContainerCommitResponse struct {
|
|
ID string `json:"Id"`
|
|
}
|
|
|
|
// GET "/containers/{name:.*}/changes"
|
|
type ContainerChange struct {
|
|
Kind int
|
|
Path string
|
|
}
|
|
|
|
// GET "/images/{name:.*}/history"
|
|
type ImageHistory struct {
|
|
ID string `json:"Id"`
|
|
Created int64
|
|
CreatedBy string
|
|
Tags []string
|
|
Size int64
|
|
Comment string
|
|
}
|
|
|
|
// DELETE "/images/{name:.*}"
|
|
type ImageDelete struct {
|
|
Untagged string `json:",omitempty"`
|
|
Deleted string `json:",omitempty"`
|
|
}
|
|
|
|
// GET "/images/json"
|
|
type Image struct {
|
|
ID string `json:"Id"`
|
|
ParentId string
|
|
RepoTags []string
|
|
RepoDigests []string
|
|
Created int
|
|
Size int
|
|
VirtualSize int
|
|
Labels map[string]string
|
|
}
|
|
|
|
type LegacyImage struct {
|
|
ID string `json:"Id"`
|
|
Repository string
|
|
Tag string
|
|
Created int
|
|
Size int
|
|
VirtualSize int
|
|
}
|
|
|
|
// GET "/containers/json"
|
|
type Port struct {
|
|
IP string
|
|
PrivatePort int
|
|
PublicPort int
|
|
Type string
|
|
}
|
|
|
|
type Container struct {
|
|
ID string `json:"Id"`
|
|
Names []string `json:",omitempty"`
|
|
Image string `json:",omitempty"`
|
|
Command string `json:",omitempty"`
|
|
Created int `json:",omitempty"`
|
|
Ports []Port `json:",omitempty"`
|
|
SizeRw int `json:",omitempty"`
|
|
SizeRootFs int `json:",omitempty"`
|
|
Labels map[string]string `json:",omitempty"`
|
|
Status string `json:",omitempty"`
|
|
}
|
|
|
|
// POST "/containers/"+containerID+"/copy"
|
|
type CopyConfig struct {
|
|
Resource string
|
|
}
|
|
|
|
// GET "/containers/{name:.*}/top"
|
|
type ContainerProcessList struct {
|
|
Processes [][]string
|
|
Titles []string
|
|
}
|
|
|
|
type Version struct {
|
|
Version string
|
|
ApiVersion version.Version
|
|
GitCommit string
|
|
GoVersion string
|
|
Os string
|
|
Arch string
|
|
KernelVersion string `json:",omitempty"`
|
|
}
|
|
|
|
// GET "/info"
|
|
type Info struct {
|
|
ID string
|
|
Containers int
|
|
Images int
|
|
Driver string
|
|
DriverStatus [][2]string
|
|
MemoryLimit bool
|
|
SwapLimit bool
|
|
CpuCfsQuota bool
|
|
IPv4Forwarding bool
|
|
Debug bool
|
|
NFd int
|
|
NGoroutines int
|
|
SystemTime string
|
|
ExecutionDriver string
|
|
LoggingDriver string
|
|
NEventsListener int
|
|
KernelVersion string
|
|
OperatingSystem string
|
|
IndexServerAddress string
|
|
RegistryConfig interface{}
|
|
InitSha1 string
|
|
InitPath string
|
|
NCPU int
|
|
MemTotal int64
|
|
DockerRootDir string
|
|
HttpProxy string
|
|
HttpsProxy string
|
|
NoProxy string
|
|
Name string
|
|
Labels []string
|
|
}
|