2013-04-18 03:13:43 +02:00
|
|
|
package docker
|
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
type (
|
|
|
|
APITop struct {
|
|
|
|
Titles []string
|
|
|
|
Processes [][]string
|
|
|
|
}
|
2013-04-19 15:24:37 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIRmi struct {
|
|
|
|
Deleted string `json:",omitempty"`
|
|
|
|
Untagged string `json:",omitempty"`
|
|
|
|
}
|
2013-06-28 15:51:58 +00:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIContainers struct {
|
|
|
|
ID string `json:"Id"`
|
|
|
|
Image string
|
|
|
|
Command string
|
|
|
|
Created int64
|
|
|
|
Status string
|
|
|
|
Ports []APIPort
|
|
|
|
SizeRw int64
|
|
|
|
SizeRootFs int64
|
|
|
|
Names []string
|
|
|
|
}
|
2013-05-31 14:37:02 +00:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIContainersOld struct {
|
|
|
|
ID string `json:"Id"`
|
|
|
|
Image string
|
|
|
|
Command string
|
|
|
|
Created int64
|
|
|
|
Status string
|
|
|
|
Ports string
|
|
|
|
SizeRw int64
|
|
|
|
SizeRootFs int64
|
|
|
|
}
|
2013-04-19 15:24:37 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIID struct {
|
|
|
|
ID string `json:"Id"`
|
2013-09-04 23:41:44 +02:00
|
|
|
}
|
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIRun struct {
|
|
|
|
ID string `json:"Id"`
|
|
|
|
Warnings []string `json:",omitempty"`
|
|
|
|
}
|
2013-09-04 23:41:44 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIPort struct {
|
|
|
|
PrivatePort int64
|
|
|
|
PublicPort int64
|
|
|
|
Type string
|
|
|
|
IP string
|
|
|
|
}
|
2013-04-24 16:06:03 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIWait struct {
|
|
|
|
StatusCode int
|
|
|
|
}
|
2013-04-23 18:20:53 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIAuth struct {
|
|
|
|
Status string
|
|
|
|
}
|
2013-04-24 14:01:40 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APIImageConfig struct {
|
|
|
|
ID string `json:"Id"`
|
|
|
|
*Config
|
|
|
|
}
|
2013-05-06 13:34:31 +02:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
APICopy struct {
|
|
|
|
Resource string
|
|
|
|
HostPath string
|
|
|
|
}
|
2013-11-29 17:24:30 -08:00
|
|
|
APIContainer struct {
|
|
|
|
*Container
|
|
|
|
HostConfig *HostConfig
|
|
|
|
}
|
2013-11-18 15:35:56 -08:00
|
|
|
)
|
2013-05-19 10:46:24 -07:00
|
|
|
|
2013-11-18 15:35:56 -08:00
|
|
|
func (api APIContainers) ToLegacy() *APIContainersOld {
|
|
|
|
return &APIContainersOld{
|
|
|
|
ID: api.ID,
|
|
|
|
Image: api.Image,
|
|
|
|
Command: api.Command,
|
|
|
|
Created: api.Created,
|
|
|
|
Status: api.Status,
|
|
|
|
Ports: displayablePorts(api.Ports),
|
|
|
|
SizeRw: api.SizeRw,
|
|
|
|
SizeRootFs: api.SizeRootFs,
|
|
|
|
}
|
2013-07-16 19:07:41 -09:00
|
|
|
}
|