podman

Форк
0
344 строки · 9.4 Кб
1
package containers
2

3
import (
4
	"bufio"
5
	"io"
6

7
	"github.com/containers/podman/v5/libpod/define"
8
)
9

10
// LogOptions describe finer control of log content or
11
// how the content is formatted.
12
//
13
//go:generate go run ../generator/generator.go LogOptions
14
type LogOptions struct {
15
	Follow     *bool
16
	Since      *string
17
	Stderr     *bool
18
	Stdout     *bool
19
	Tail       *string
20
	Timestamps *bool
21
	Until      *string
22
}
23

24
// CommitOptions describe details about the resulting committed
25
// image as defined by repo and tag. None of these options
26
// are required.
27
//
28
//go:generate go run ../generator/generator.go CommitOptions
29
type CommitOptions struct {
30
	Author  *string
31
	Changes []string
32
	Config  *io.Reader `schema:"-"`
33
	Comment *string
34
	Format  *string
35
	Pause   *bool
36
	Stream  *bool
37
	Squash  *bool
38
	Repo    *string
39
	Tag     *string
40
}
41

42
// AttachOptions are optional options for attaching to containers
43
//
44
//go:generate go run ../generator/generator.go AttachOptions
45
type AttachOptions struct {
46
	DetachKeys *string // Keys to detach from running container
47
	Logs       *bool   // Flag to return all logs from container when true
48
	Stream     *bool   // Flag only return container logs when false and Logs is true
49
}
50

51
// CheckpointOptions are optional options for checkpointing containers
52
//
53
//go:generate go run ../generator/generator.go CheckpointOptions
54
type CheckpointOptions struct {
55
	Export         *string
56
	CreateImage    *string
57
	IgnoreRootfs   *bool
58
	Keep           *bool
59
	LeaveRunning   *bool
60
	TCPEstablished *bool
61
	PrintStats     *bool
62
	PreCheckpoint  *bool
63
	WithPrevious   *bool
64
	FileLocks      *bool
65
}
66

67
// RestoreOptions are optional options for restoring containers
68
//
69
//go:generate go run ../generator/generator.go RestoreOptions
70
type RestoreOptions struct {
71
	IgnoreRootfs    *bool
72
	IgnoreVolumes   *bool
73
	IgnoreStaticIP  *bool
74
	IgnoreStaticMAC *bool
75
	// ImportAchive is the path to an archive which contains the checkpoint data.
76
	//
77
	// Deprecated: Use ImportArchive instead. This field name is a typo and
78
	// will be removed in a future major release.
79
	ImportAchive *string
80
	// ImportArchive is the path to an archive which contains the checkpoint data.
81
	// ImportArchive is preferred over ImportAchive when both are set.
82
	ImportArchive  *string
83
	Keep           *bool
84
	Name           *string
85
	TCPEstablished *bool
86
	Pod            *string
87
	PrintStats     *bool
88
	PublishPorts   []string
89
	FileLocks      *bool
90
}
91

92
// CreateOptions are optional options for creating containers
93
//
94
//go:generate go run ../generator/generator.go CreateOptions
95
type CreateOptions struct{}
96

97
// DiffOptions are optional options for creating containers
98
//
99
//go:generate go run ../generator/generator.go DiffOptions
100
type DiffOptions struct {
101
	// By the default diff will compare against the parent layer. Change the Parent if you want to compare against something else.
102
	Parent *string
103
	// Change the type the backend should match. This can be set to "all", "container" or "image".
104
	DiffType *string
105
}
106

107
// ExecInspectOptions are optional options for inspecting
108
// exec sessions
109
//
110
//go:generate go run ../generator/generator.go ExecInspectOptions
111
type ExecInspectOptions struct{}
112

113
// ExecStartOptions are optional options for starting
114
// exec sessions
115
//
116
//go:generate go run ../generator/generator.go ExecStartOptions
117
type ExecStartOptions struct {
118
}
119

120
// HealthCheckOptions are optional options for checking
121
// the health of a container
122
//
123
//go:generate go run ../generator/generator.go HealthCheckOptions
124
type HealthCheckOptions struct{}
125

126
// MountOptions are optional options for mounting
127
// containers
128
//
129
//go:generate go run ../generator/generator.go MountOptions
130
type MountOptions struct{}
131

132
// UnmountOptions are optional options for unmounting
133
// containers
134
//
135
//go:generate go run ../generator/generator.go UnmountOptions
136
type UnmountOptions struct{}
137

138
// MountedContainerPathsOptions are optional options for getting
139
// container mount paths
140
//
141
//go:generate go run ../generator/generator.go MountedContainerPathsOptions
142
type MountedContainerPathsOptions struct{}
143

144
// ListOptions are optional options for listing containers
145
//
146
//go:generate go run ../generator/generator.go ListOptions
147
type ListOptions struct {
148
	All       *bool
149
	External  *bool
150
	Filters   map[string][]string
151
	Last      *int
152
	Namespace *bool
153
	Size      *bool
154
	Sync      *bool
155
}
156

157
// PruneOptions are optional options for pruning containers
158
//
159
//go:generate go run ../generator/generator.go PruneOptions
160
type PruneOptions struct {
161
	Filters map[string][]string
162
}
163

164
// RemoveOptions are optional options for removing containers
165
//
166
//go:generate go run ../generator/generator.go RemoveOptions
167
type RemoveOptions struct {
168
	Depend  *bool
169
	Ignore  *bool
170
	Force   *bool
171
	Volumes *bool
172
	Timeout *uint
173
}
174

175
// InspectOptions are optional options for inspecting containers
176
//
177
//go:generate go run ../generator/generator.go InspectOptions
178
type InspectOptions struct {
179
	Size *bool
180
}
181

182
// KillOptions are optional options for killing containers
183
//
184
//go:generate go run ../generator/generator.go KillOptions
185
type KillOptions struct {
186
	Signal *string
187
}
188

189
// PauseOptions are optional options for pausing containers
190
//
191
//go:generate go run ../generator/generator.go PauseOptions
192
type PauseOptions struct{}
193

194
// RestartOptions are optional options for restarting containers
195
//
196
//go:generate go run ../generator/generator.go RestartOptions
197
type RestartOptions struct {
198
	Timeout *int
199
}
200

201
// StartOptions are optional options for starting containers
202
//
203
//go:generate go run ../generator/generator.go StartOptions
204
type StartOptions struct {
205
	DetachKeys *string
206
	Recursive  *bool
207
}
208

209
// StatsOptions are optional options for getting stats on containers
210
//
211
//go:generate go run ../generator/generator.go StatsOptions
212
type StatsOptions struct {
213
	All      *bool
214
	Stream   *bool
215
	Interval *int
216
}
217

218
// TopOptions are optional options for getting running
219
// processes in containers
220
//
221
//go:generate go run ../generator/generator.go TopOptions
222
type TopOptions struct {
223
	Descriptors *[]string
224
}
225

226
// UnpauseOptions are optional options for unpausing containers
227
//
228
//go:generate go run ../generator/generator.go UnpauseOptions
229
type UnpauseOptions struct{}
230

231
// WaitOptions are optional options for waiting on containers
232
//
233
//go:generate go run ../generator/generator.go WaitOptions
234
type WaitOptions struct {
235
	// Conditions to wait on.  Includes container statuses such as
236
	// "running" or "stopped" and health-related values such "healthy".
237
	Conditions []string `schema:"condition"`
238
	// Time interval to wait before polling for completion.
239
	Interval *string
240
	// Container status to wait on.
241
	// Deprecated: use Conditions instead.
242
	Condition []define.ContainerStatus
243
}
244

245
// StopOptions are optional options for stopping containers
246
//
247
//go:generate go run ../generator/generator.go StopOptions
248
type StopOptions struct {
249
	Ignore  *bool
250
	Timeout *uint
251
}
252

253
// ExportOptions are optional options for exporting containers
254
//
255
//go:generate go run ../generator/generator.go ExportOptions
256
type ExportOptions struct{}
257

258
// InitOptions are optional options for initing containers
259
//
260
//go:generate go run ../generator/generator.go InitOptions
261
type InitOptions struct{}
262

263
// ShouldRestartOptions
264
//
265
//go:generate go run ../generator/generator.go ShouldRestartOptions
266
type ShouldRestartOptions struct{}
267

268
// RenameOptions are options for renaming containers.
269
// The Name field is required.
270
//
271
//go:generate go run ../generator/generator.go RenameOptions
272
type RenameOptions struct {
273
	Name *string
274
}
275

276
// ResizeTTYOptions are optional options for resizing
277
// container TTYs
278
//
279
//go:generate go run ../generator/generator.go ResizeTTYOptions
280
type ResizeTTYOptions struct {
281
	Height  *int
282
	Width   *int
283
	Running *bool
284
}
285

286
// ResizeExecTTYOptions are optional options for resizing
287
// container ExecTTYs
288
//
289
//go:generate go run ../generator/generator.go ResizeExecTTYOptions
290
type ResizeExecTTYOptions struct {
291
	Height *int
292
	Width  *int
293
}
294

295
// ExecStartAndAttachOptions are optional options for resizing
296
// container ExecTTYs
297
//
298
//go:generate go run ../generator/generator.go ExecStartAndAttachOptions
299
type ExecStartAndAttachOptions struct {
300
	// OutputStream will be attached to container's STDOUT
301
	OutputStream *io.Writer
302
	// ErrorStream will be attached to container's STDERR
303
	ErrorStream *io.Writer
304
	// InputStream will be attached to container's STDIN
305
	InputStream *bufio.Reader
306
	// AttachOutput is whether to attach to STDOUT
307
	// If false, stdout will not be attached
308
	AttachOutput *bool
309
	// AttachError is whether to attach to STDERR
310
	// If false, stdout will not be attached
311
	AttachError *bool
312
	// AttachInput is whether to attach to STDIN
313
	// If false, stdout will not be attached
314
	AttachInput *bool
315
}
316

317
// ExistsOptions are optional options for checking if a container exists
318
//
319
//go:generate go run ../generator/generator.go ExistsOptions
320
type ExistsOptions struct {
321
	// External checks for containers created outside of Podman
322
	External *bool
323
}
324

325
// CopyOptions are options for copying to containers.
326
//
327
//go:generate go run ../generator/generator.go CopyOptions
328
type CopyOptions struct {
329
	// If used with CopyFromArchive and set to true it will change ownership of files from the source tar archive
330
	// to the primary uid/gid of the target container.
331
	Chown *bool `schema:"copyUIDGID"`
332
	// Map to translate path names.
333
	Rename map[string]string
334
	// NoOverwriteDirNonDir when true prevents an existing directory or file from being overwritten
335
	// by the other type.
336
	NoOverwriteDirNonDir *bool
337
}
338

339
// ExecRemoveOptions are optional options for removing an exec session
340
//
341
//go:generate go run ../generator/generator.go ExecRemoveOptions
342
type ExecRemoveOptions struct {
343
	Force *bool
344
}
345

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.