-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
types.go
178 lines (149 loc) · 4.23 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
package handlers
import (
"github.com/containers/podman/v5/pkg/domain/entities"
docker "github.com/docker/docker/api/types"
dockerBackend "github.com/docker/docker/api/types/backend"
dockerContainer "github.com/docker/docker/api/types/container"
dockerNetwork "github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/registry"
"github.com/docker/docker/api/types/system"
"github.com/opencontainers/runtime-spec/specs-go"
)
type AuthConfig struct {
registry.AuthConfig
}
type ImageInspect struct {
docker.ImageInspect
// Container is for backwards compat but is basically unused
Container string
}
type ContainerConfig struct {
dockerContainer.Config
}
type LibpodImagesPullReport struct {
entities.ImagePullReport
}
// LibpodImagesRemoveReport is the return type for image removal via the rest
// api.
type LibpodImagesRemoveReport struct {
entities.ImageRemoveReport
// Image removal requires is to return data and an error.
Errors []string
}
// LibpodImagesResolveReport includes a list of fully-qualified image references.
type LibpodImagesResolveReport struct {
// Fully-qualified image references.
Names []string
}
type ContainersPruneReport struct {
docker.ContainersPruneReport
}
type ContainersPruneReportLibpod struct {
ID string `json:"Id"`
SpaceReclaimed int64 `json:"Size"`
// Error which occurred during prune operation (if any).
// This field is optional and may be omitted if no error occurred.
//
// Extensions:
// x-omitempty: true
// x-nullable: true
PruneError string `json:"Err,omitempty"`
}
type LibpodContainersRmReport struct {
ID string `json:"Id"`
// Error which occurred during Rm operation (if any).
// This field is optional and may be omitted if no error occurred.
//
// Extensions:
// x-omitempty: true
// x-nullable: true
RmError string `json:"Err,omitempty"`
}
// UpdateEntities used to wrap the oci resource spec in a swagger model
// swagger:model
type UpdateEntities struct {
Resources *specs.LinuxResources
}
type Info struct {
system.Info
BuildahVersion string
CPURealtimePeriod bool
CPURealtimeRuntime bool
CgroupVersion string
Rootless bool
SwapFree int64
SwapTotal int64
Uptime string
}
type Container struct {
docker.Container
dockerBackend.ContainerCreateConfig
}
type DiskUsage struct {
docker.DiskUsage
}
type VolumesPruneReport struct {
docker.VolumesPruneReport
}
type ImagesPruneReport struct {
docker.ImagesPruneReport
}
type BuildCachePruneReport struct {
docker.BuildCachePruneReport
}
type NetworkPruneReport struct {
docker.NetworksPruneReport
}
type ConfigCreateResponse struct {
docker.ConfigCreateResponse
}
type PushResult struct {
docker.PushResult
}
type BuildResult struct {
docker.BuildResult
}
type ContainerWaitOKBody struct {
StatusCode int
Error *struct {
Message string
}
}
// CreateContainerConfig used when compatible endpoint creates a container
// swagger:model
type CreateContainerConfig struct {
Name string // container name
dockerContainer.Config // desired container configuration
HostConfig dockerContainer.HostConfig // host dependent configuration for container
NetworkingConfig dockerNetwork.NetworkingConfig // network configuration for container
EnvMerge []string // preprocess env variables from image before injecting into containers
UnsetEnv []string // unset specified default environment variables
UnsetEnvAll bool // unset all default environment variables
}
type ContainerTopOKBody struct {
dockerContainer.ContainerTopOKBody
}
type PodTopOKBody struct {
dockerContainer.ContainerTopOKBody
}
// HistoryResponse provides details on image layers
type HistoryResponse struct {
ID string `json:"Id"`
Created int64
CreatedBy string
Tags []string
Size int64
Comment string
}
type ExecCreateConfig struct {
docker.ExecConfig
}
type ExecStartConfig struct {
Detach bool `json:"Detach"`
Tty bool `json:"Tty"`
Height uint16 `json:"h"`
Width uint16 `json:"w"`
}
type ExecRemoveConfig struct {
Force bool `json:"Force"`
}