types.go 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. package types
  2. import "github.com/docker/docker/pkg/version"
  3. // ContainerCreateResponse contains the information returned to a client on the
  4. // creation of a new container.
  5. type ContainerCreateResponse struct {
  6. // ID is the ID of the created container.
  7. ID string `json:"Id"`
  8. // Warnings are any warnings encountered during the creation of the container.
  9. Warnings []string `json:"Warnings"`
  10. }
  11. // POST /containers/{name:.*}/exec
  12. type ContainerExecCreateResponse struct {
  13. // ID is the exec ID.
  14. ID string `json:"Id"`
  15. // Warnings are any warnings encountered during the execution of the command.
  16. Warnings []string `json:"Warnings"`
  17. }
  18. // POST /auth
  19. type AuthResponse struct {
  20. // Status is the authentication status
  21. Status string `json:"Status"`
  22. }
  23. // POST "/containers/"+containerID+"/wait"
  24. type ContainerWaitResponse struct {
  25. // StatusCode is the status code of the wait job
  26. StatusCode int `json:"StatusCode"`
  27. }
  28. // POST "/commit?container="+containerID
  29. type ContainerCommitResponse struct {
  30. ID string `json:"Id"`
  31. }
  32. // GET "/containers/{name:.*}/changes"
  33. type ContainerChange struct {
  34. Kind int
  35. Path string
  36. }
  37. // GET "/images/{name:.*}/history"
  38. type ImageHistory struct {
  39. ID string `json:"Id"`
  40. Created int64
  41. CreatedBy string
  42. Tags []string
  43. Size int64
  44. Comment string
  45. }
  46. // DELETE "/images/{name:.*}"
  47. type ImageDelete struct {
  48. Untagged string `json:",omitempty"`
  49. Deleted string `json:",omitempty"`
  50. }
  51. // GET "/images/json"
  52. type Image struct {
  53. ID string `json:"Id"`
  54. ParentId string
  55. RepoTags []string
  56. RepoDigests []string
  57. Created int
  58. Size int
  59. VirtualSize int
  60. Labels map[string]string
  61. }
  62. type LegacyImage struct {
  63. ID string `json:"Id"`
  64. Repository string
  65. Tag string
  66. Created int
  67. Size int
  68. VirtualSize int
  69. }
  70. // GET "/containers/json"
  71. type Port struct {
  72. IP string
  73. PrivatePort int
  74. PublicPort int
  75. Type string
  76. }
  77. type Container struct {
  78. ID string `json:"Id"`
  79. Names []string `json:",omitempty"`
  80. Image string `json:",omitempty"`
  81. Command string `json:",omitempty"`
  82. Created int `json:",omitempty"`
  83. Ports []Port `json:",omitempty"`
  84. SizeRw int `json:",omitempty"`
  85. SizeRootFs int `json:",omitempty"`
  86. Labels map[string]string `json:",omitempty"`
  87. Status string `json:",omitempty"`
  88. }
  89. // POST "/containers/"+containerID+"/copy"
  90. type CopyConfig struct {
  91. Resource string
  92. }
  93. // GET "/containers/{name:.*}/top"
  94. type ContainerProcessList struct {
  95. Processes [][]string
  96. Titles []string
  97. }
  98. type Version struct {
  99. Version string
  100. ApiVersion version.Version
  101. GitCommit string
  102. GoVersion string
  103. Os string
  104. Arch string
  105. KernelVersion string `json:",omitempty"`
  106. }
  107. // GET "/info"
  108. type Info struct {
  109. ID string
  110. Containers int
  111. Images int
  112. Driver string
  113. DriverStatus [][2]string
  114. MemoryLimit bool
  115. SwapLimit bool
  116. IPv4Forwarding bool
  117. Debug bool
  118. NFd int
  119. NGoroutines int
  120. SystemTime string
  121. ExecutionDriver string
  122. LoggingDriver string
  123. NEventsListener int
  124. KernelVersion string
  125. OperatingSystem string
  126. IndexServerAddress string
  127. RegistryConfig interface{}
  128. InitSha1 string
  129. InitPath string
  130. NCPU int
  131. MemTotal int64
  132. DockerRootDir string
  133. HttpProxy string
  134. HttpsProxy string
  135. NoProxy string
  136. Name string
  137. Labels []string
  138. }