podman
344 строки · 9.4 Кб
1package containers
2
3import (
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
14type LogOptions struct {
15Follow *bool
16Since *string
17Stderr *bool
18Stdout *bool
19Tail *string
20Timestamps *bool
21Until *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
29type CommitOptions struct {
30Author *string
31Changes []string
32Config *io.Reader `schema:"-"`
33Comment *string
34Format *string
35Pause *bool
36Stream *bool
37Squash *bool
38Repo *string
39Tag *string
40}
41
42// AttachOptions are optional options for attaching to containers
43//
44//go:generate go run ../generator/generator.go AttachOptions
45type AttachOptions struct {
46DetachKeys *string // Keys to detach from running container
47Logs *bool // Flag to return all logs from container when true
48Stream *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
54type CheckpointOptions struct {
55Export *string
56CreateImage *string
57IgnoreRootfs *bool
58Keep *bool
59LeaveRunning *bool
60TCPEstablished *bool
61PrintStats *bool
62PreCheckpoint *bool
63WithPrevious *bool
64FileLocks *bool
65}
66
67// RestoreOptions are optional options for restoring containers
68//
69//go:generate go run ../generator/generator.go RestoreOptions
70type RestoreOptions struct {
71IgnoreRootfs *bool
72IgnoreVolumes *bool
73IgnoreStaticIP *bool
74IgnoreStaticMAC *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.
79ImportAchive *string
80// ImportArchive is the path to an archive which contains the checkpoint data.
81// ImportArchive is preferred over ImportAchive when both are set.
82ImportArchive *string
83Keep *bool
84Name *string
85TCPEstablished *bool
86Pod *string
87PrintStats *bool
88PublishPorts []string
89FileLocks *bool
90}
91
92// CreateOptions are optional options for creating containers
93//
94//go:generate go run ../generator/generator.go CreateOptions
95type CreateOptions struct{}
96
97// DiffOptions are optional options for creating containers
98//
99//go:generate go run ../generator/generator.go DiffOptions
100type DiffOptions struct {
101// By the default diff will compare against the parent layer. Change the Parent if you want to compare against something else.
102Parent *string
103// Change the type the backend should match. This can be set to "all", "container" or "image".
104DiffType *string
105}
106
107// ExecInspectOptions are optional options for inspecting
108// exec sessions
109//
110//go:generate go run ../generator/generator.go ExecInspectOptions
111type ExecInspectOptions struct{}
112
113// ExecStartOptions are optional options for starting
114// exec sessions
115//
116//go:generate go run ../generator/generator.go ExecStartOptions
117type 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
124type HealthCheckOptions struct{}
125
126// MountOptions are optional options for mounting
127// containers
128//
129//go:generate go run ../generator/generator.go MountOptions
130type MountOptions struct{}
131
132// UnmountOptions are optional options for unmounting
133// containers
134//
135//go:generate go run ../generator/generator.go UnmountOptions
136type UnmountOptions struct{}
137
138// MountedContainerPathsOptions are optional options for getting
139// container mount paths
140//
141//go:generate go run ../generator/generator.go MountedContainerPathsOptions
142type MountedContainerPathsOptions struct{}
143
144// ListOptions are optional options for listing containers
145//
146//go:generate go run ../generator/generator.go ListOptions
147type ListOptions struct {
148All *bool
149External *bool
150Filters map[string][]string
151Last *int
152Namespace *bool
153Size *bool
154Sync *bool
155}
156
157// PruneOptions are optional options for pruning containers
158//
159//go:generate go run ../generator/generator.go PruneOptions
160type PruneOptions struct {
161Filters map[string][]string
162}
163
164// RemoveOptions are optional options for removing containers
165//
166//go:generate go run ../generator/generator.go RemoveOptions
167type RemoveOptions struct {
168Depend *bool
169Ignore *bool
170Force *bool
171Volumes *bool
172Timeout *uint
173}
174
175// InspectOptions are optional options for inspecting containers
176//
177//go:generate go run ../generator/generator.go InspectOptions
178type InspectOptions struct {
179Size *bool
180}
181
182// KillOptions are optional options for killing containers
183//
184//go:generate go run ../generator/generator.go KillOptions
185type KillOptions struct {
186Signal *string
187}
188
189// PauseOptions are optional options for pausing containers
190//
191//go:generate go run ../generator/generator.go PauseOptions
192type PauseOptions struct{}
193
194// RestartOptions are optional options for restarting containers
195//
196//go:generate go run ../generator/generator.go RestartOptions
197type RestartOptions struct {
198Timeout *int
199}
200
201// StartOptions are optional options for starting containers
202//
203//go:generate go run ../generator/generator.go StartOptions
204type StartOptions struct {
205DetachKeys *string
206Recursive *bool
207}
208
209// StatsOptions are optional options for getting stats on containers
210//
211//go:generate go run ../generator/generator.go StatsOptions
212type StatsOptions struct {
213All *bool
214Stream *bool
215Interval *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
222type TopOptions struct {
223Descriptors *[]string
224}
225
226// UnpauseOptions are optional options for unpausing containers
227//
228//go:generate go run ../generator/generator.go UnpauseOptions
229type UnpauseOptions struct{}
230
231// WaitOptions are optional options for waiting on containers
232//
233//go:generate go run ../generator/generator.go WaitOptions
234type WaitOptions struct {
235// Conditions to wait on. Includes container statuses such as
236// "running" or "stopped" and health-related values such "healthy".
237Conditions []string `schema:"condition"`
238// Time interval to wait before polling for completion.
239Interval *string
240// Container status to wait on.
241// Deprecated: use Conditions instead.
242Condition []define.ContainerStatus
243}
244
245// StopOptions are optional options for stopping containers
246//
247//go:generate go run ../generator/generator.go StopOptions
248type StopOptions struct {
249Ignore *bool
250Timeout *uint
251}
252
253// ExportOptions are optional options for exporting containers
254//
255//go:generate go run ../generator/generator.go ExportOptions
256type ExportOptions struct{}
257
258// InitOptions are optional options for initing containers
259//
260//go:generate go run ../generator/generator.go InitOptions
261type InitOptions struct{}
262
263// ShouldRestartOptions
264//
265//go:generate go run ../generator/generator.go ShouldRestartOptions
266type 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
272type RenameOptions struct {
273Name *string
274}
275
276// ResizeTTYOptions are optional options for resizing
277// container TTYs
278//
279//go:generate go run ../generator/generator.go ResizeTTYOptions
280type ResizeTTYOptions struct {
281Height *int
282Width *int
283Running *bool
284}
285
286// ResizeExecTTYOptions are optional options for resizing
287// container ExecTTYs
288//
289//go:generate go run ../generator/generator.go ResizeExecTTYOptions
290type ResizeExecTTYOptions struct {
291Height *int
292Width *int
293}
294
295// ExecStartAndAttachOptions are optional options for resizing
296// container ExecTTYs
297//
298//go:generate go run ../generator/generator.go ExecStartAndAttachOptions
299type ExecStartAndAttachOptions struct {
300// OutputStream will be attached to container's STDOUT
301OutputStream *io.Writer
302// ErrorStream will be attached to container's STDERR
303ErrorStream *io.Writer
304// InputStream will be attached to container's STDIN
305InputStream *bufio.Reader
306// AttachOutput is whether to attach to STDOUT
307// If false, stdout will not be attached
308AttachOutput *bool
309// AttachError is whether to attach to STDERR
310// If false, stdout will not be attached
311AttachError *bool
312// AttachInput is whether to attach to STDIN
313// If false, stdout will not be attached
314AttachInput *bool
315}
316
317// ExistsOptions are optional options for checking if a container exists
318//
319//go:generate go run ../generator/generator.go ExistsOptions
320type ExistsOptions struct {
321// External checks for containers created outside of Podman
322External *bool
323}
324
325// CopyOptions are options for copying to containers.
326//
327//go:generate go run ../generator/generator.go CopyOptions
328type 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.
331Chown *bool `schema:"copyUIDGID"`
332// Map to translate path names.
333Rename map[string]string
334// NoOverwriteDirNonDir when true prevents an existing directory or file from being overwritten
335// by the other type.
336NoOverwriteDirNonDir *bool
337}
338
339// ExecRemoveOptions are optional options for removing an exec session
340//
341//go:generate go run ../generator/generator.go ExecRemoveOptions
342type ExecRemoveOptions struct {
343Force *bool
344}
345