-
Notifications
You must be signed in to change notification settings - Fork 377
/
modeldefs.go
384 lines (323 loc) · 12.5 KB
/
modeldefs.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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
package main
import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/go-units"
)
// Args map
type Args map[string]map[string]bool
// ImageBuildParameters for POST /build
type ImageBuildParameters struct {
Tags []string `rest:"query,t"`
SuppressOutput bool `rest:"query,q"`
RemoteContext string `rest:"query,remote"`
NoCache bool `rest:"query"`
Remove bool `rest:"query,rm"`
ForceRemove bool `rest:"query,forcerm"`
PullParent bool `rest:"query"`
Isolation string `rest:"query"`
CPUSetCPUs string `rest:"query"`
CPUSetMems string `rest:"query"`
CPUShares int64 `rest:"query"`
CPUQuota int64 `rest:"query"`
CPUPeriod int64 `rest:"query"`
Memory int64 `rest:"query"`
MemorySwap int64 `rest:"query,memswap"`
CgroupParent string `rest:"query"`
NetworkMode string `rest:"query"`
ShmSize int64 `rest:"query"`
Dockerfile string `rest:"query"`
Ulimits []*units.Ulimit `rest:"query"`
BuildArgs map[string]string `rest:"query"`
AuthConfigs map[string]types.AuthConfig `rest:"headers,X-Registry-Auth"`
Labels map[string]string `rest:"query"`
Squash bool `rest:"query"`
CacheFrom []string `rest:"query"`
SecurityOpt []string `rest:"query"`
ExtraHosts []string `rest:"query"`
Target string `rest:"query"`
SessionID string `rest:"query,session"`
Platform string `rest:"query"`
}
// CommitContainerChangesParameters for POST /commit
type CommitContainerChangesParameters struct {
ContainerID string `rest:"query,container,required"`
RepositoryName string `rest:"query,repo"`
Tag string `rest:"query"`
Comment string `rest:"query"`
Author string `rest:"query"`
Changes []string `rest:"query"`
Pause bool `rest:"query"`
Config *container.Config
}
// CommitContainerChangesResponse for POST /commit
type CommitContainerChangesResponse types.IDResponse
// CreateContainerParameters for POST /containers/create
type CreateContainerParameters struct {
Name string `rest:"query,name"`
*container.Config `rest:"body"`
HostConfig *container.HostConfig `rest:"body"`
NetworkingConfig *network.NetworkingConfig `rest:"body"`
}
// ContainersListParameters for GET /containers/json
type ContainersListParameters struct {
Size bool `rest:"query"`
All bool `rest:"query"`
Since string `rest:"query"`
Before string `rest:"query"`
Limit int `rest:"query"`
Filters Args `rest:"query"`
}
// ContainerRemoveParameters for DELETE /containers/(id)
type ContainerRemoveParameters struct {
RemoveVolumes bool `rest:"query,v"`
RemoveLinks bool `rest:"query,link"`
Force bool `rest:"query"`
}
// ContainerPathStatParameters for GET /containers/(id)/archive
type ContainerPathStatParameters struct {
Path string `rest:"query,path,required"`
AllowOverwriteDirWithFile bool `rest:"query,noOverwriteDirNonDir"`
}
// ContainerAttachParameters for POST /containers/(id)/attach
type ContainerAttachParameters struct {
Stream bool `rest:"query"`
Stdin bool `rest:"query"`
Stdout bool `rest:"query"`
Stderr bool `rest:"query"`
DetachKeys string `rest:"query,detachKeys"`
Logs string `rest:"query"`
}
// ContainerInspectParameters for GET /containers/(id)/json
type ContainerInspectParameters struct {
IncludeSize bool `rest:"query,size"`
}
// ContainerKillParameters for POST /containers/(id)/kill
type ContainerKillParameters struct {
Signal string `rest:"query"`
}
// ContainerLogsParameters for POST /containers/(id)/logs
type ContainerLogsParameters struct {
ShowStdout bool `rest:"query,stdout"`
ShowStderr bool `rest:"query,stderr"`
Since string `rest:"query"`
Timestamps bool `rest:"query"`
Follow bool `rest:"query"`
Tail string `rest:"query"`
}
// ContainerRenameParameters for POST /containers/(id)/rename
type ContainerRenameParameters struct {
NewName string `rest:"query,name"`
}
// ContainerResizeParameters for POST /containers/(id)/resize
type ContainerResizeParameters struct {
Height int `rest:"query,h"`
Width int `rest:"query,w"`
}
// ContainerRestartParameters for POST /containers/(id)/restart
type ContainerRestartParameters struct {
WaitBeforeKillSeconds uint32 `rest:"query,t"`
}
// ContainerStartParameters for POST /containers/(id)/start
type ContainerStartParameters struct {
DetachKeys string `rest:"query,detachKeys"`
}
// ContainerStopParameters for POST /containers/(id)/stop
type ContainerStopParameters struct {
WaitBeforeKillSeconds uint32 `rest:"query,t"`
}
// ContainerStatsParameters for GET /containers/(id)/stats
type ContainerStatsParameters struct {
Stream bool `rest:"query,stream,required,true"`
}
// ContainerListProcessesParameters for GET /containers/(id)/top
type ContainerListProcessesParameters struct {
PsArgs string `rest:"query,ps_args"`
}
// ContainerUpdateParameters for POST /containers/(id)/update
type ContainerUpdateParameters struct {
container.UpdateConfig
}
// ContainerUpdateResponse for POST /containers/(id)/update
type ContainerUpdateResponse struct {
// Warnings are any warnings encountered during the updating of the container.
Warnings []string `json:"Warnings"`
}
// ContainerWaitResponse for POST /containers/(id)/wait
type ContainerWaitResponse struct {
// StatusCode is the status code of the wait job
StatusCode int `json:"StatusCode"`
}
// ContainerEventsParameters for GET /events
type ContainerEventsParameters struct {
Since string `rest:"query"`
Until string `rest:"query"`
Filters Args `rest:"query"`
}
// ContainersPruneParameters for POST /containers/prune
type ContainersPruneParameters struct {
Filters Args `rest:"query"`
}
// ContainerExecCreateParameters for POST /containers/(id)/exec
type ContainerExecCreateParameters types.ExecConfig
// ContainerExecCreateResponse for POST /containers/(id)/exec
type ContainerExecCreateResponse types.IDResponse
// ContainerExecStartParameters for POST /exec/(id)/start
type ContainerExecStartParameters types.ExecConfig
// ImagesCreateParameters for POST /images/create
type ImagesCreateParameters struct {
FromImage string `rest:"query,fromImage"`
FromSrc string `rest:"query,fromSrc"`
Repo string `rest:"query"`
Tag string `rest:"query"`
}
// ImagesListParameters for GET /images/json
type ImagesListParameters struct {
MatchName string `rest:"query,filter"`
All bool `rest:"query"`
Filters Args `rest:"query"`
}
// ImageLoadParameters for POST /images/load
type ImageLoadParameters struct {
Quiet bool `rest:"query,quiet,required"`
}
// ImagesPruneParameters for POST /images/prune
type ImagesPruneParameters struct {
Filters Args `rest:"query"`
}
// ImagesSearchParameters for GET /images/search
type ImagesSearchParameters struct {
Term string `rest:"query"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
}
// ImageDeleteParameters for DELETE /images/(id)
type ImageDeleteParameters struct {
Force bool `rest:"query"`
NoPrune bool `rest:"query,noprune"`
}
// ImageInspectParameters for GET /images/(id)/json
type ImageInspectParameters struct {
IncludeSize bool `rest:"query,size"`
}
// ImagePushParameters for POST /images/(id)/push
type ImagePushParameters struct {
ImageID string `rest:"query,fromImage"`
Tag string `rest:"query"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
}
// ImageTagParameters for POST /images/(id)/tag
type ImageTagParameters struct {
RepositoryName string `rest:"query,repo"`
Tag string `rest:"query"`
Force bool `rest:"query"`
}
// NetworksListParameters for GET /networks
type NetworksListParameters struct {
Filters Args `rest:"query"`
}
// NetworksDeleteUnusedParameters for POST /networks/prune
type NetworksDeleteUnusedParameters struct {
Filters Args `rest:"query"`
}
// PluginListParameters for GET /plugins
type PluginListParameters struct {
Filters Args `rest:"query"`
}
// PluginGetPrivilegeParameters for POST /plugins/privileges
type PluginGetPrivilegeParameters struct {
Remote string `rest:"query,remote,required"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
}
// PluginInstallParameters for POST /plugins/pull
type PluginInstallParameters struct {
Remote string `rest:"query,remote,required"`
Name string `rest:"query"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
Privileges types.PluginPrivileges `rest:"body,,required"`
}
// PluginRemoveParameters for DELETE /plugins/(name)/json
type PluginRemoveParameters struct {
Force bool `rest:"query"`
}
// PluginEnableParameters for POST /plugins/(name)/enable
type PluginEnableParameters struct {
Timeout int `rest:"query"`
}
// PluginDisableParameters for POST /plugins/(name)/disable
type PluginDisableParameters struct {
Force bool `rest:"query"`
}
// PluginUpgradeParameters for POST /plugins/(name)/upgrade
type PluginUpgradeParameters struct {
Remote string `rest:"query,remote,required"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
Privileges types.PluginPrivileges `rest:"body,,required"`
}
// PluginCreateParameters for POST /plugins/create
type PluginCreateParameters struct {
Name string `rest:"query,name,required"`
}
// PluginConfigureParameters for POST /plugins/(name)/set
type PluginConfigureParameters struct {
Args []string `rest:"body,,required"`
}
// VolumesCreateParameters for POST /volumes/create
type VolumesCreateParameters struct {
Name string // Name is the requested name of the volume
Driver string // Driver is the name of the driver that should be used to create the volume
DriverOpts map[string]string // DriverOpts holds the driver specific options to use for when creating the volume.
Labels map[string]string // Labels holds metadata specific to the volume being created.
}
// VolumesListParameters for GET /volumes
type VolumesListParameters struct {
Filters Args `rest:"query"`
}
// VolumesPruneParameters for POST /volumes/prune
type VolumesPruneParameters struct {
Filters Args `rest:"query"`
}
// VolumeResponse for volume list.
type VolumeResponse types.Volume
// VolumesListResponse for GET /volumes
type VolumesListResponse struct {
Volumes []*VolumeResponse
Warnings []string
}
// SwarmLeaveParameters for POST /swarm/leave
type SwarmLeaveParameters struct {
Force bool `rest:"query"`
}
// SwarmUnlockResponse for GET /swarm/unlockkey
type SwarmUnlockResponse swarm.UnlockRequest
// SwarmUpdateParameters for POST /swarm/update
type SwarmUpdateParameters struct {
Spec swarm.Spec `rest:"body,spec,required"`
Version int64 `rest:"query,version,required"`
RotateWorkerToken bool `rest:"query"`
RotateManagerToken bool `rest:"query"`
RotateManagerUnlockKey bool `rest:"query"`
}
// SwarmUnlockParameters for POST /swarm/unlock
type SwarmUnlockParameters swarm.UnlockRequest
// ServiceCreateParameters for POST /services/create
type ServiceCreateParameters struct {
Service swarm.ServiceSpec `rest:"body,service,required"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
}
// ServiceUpdateParameters for POST /services/{id}/update
type ServiceUpdateParameters struct {
Service swarm.ServiceSpec `rest:"body,service,required"`
Version int64 `rest:"query,version,required"`
RegistryAuthFrom string `rest:"query"`
RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"`
}
// SecretCreateResponse for POST /secrets/create
type SecretCreateResponse struct {
ID string
}
// TasksListParameters for GET /tasks
type TasksListParameters struct {
Filters Args `rest:"query"`
}