github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/bindings/containers/types.go (about) 1 package containers 2 3 import ( 4 "bufio" 5 "io" 6 7 "github.com/hanks177/podman/v4/libpod/define" 8 ) 9 10 //go:generate go run ../generator/generator.go LogOptions 11 // LogOptions describe finer control of log content or 12 // how the content is formatted. 13 type LogOptions struct { 14 Follow *bool 15 Since *string 16 Stderr *bool 17 Stdout *bool 18 Tail *string 19 Timestamps *bool 20 Until *string 21 } 22 23 //go:generate go run ../generator/generator.go CommitOptions 24 // CommitOptions describe details about the resulting committed 25 // image as defined by repo and tag. None of these options 26 // are required. 27 type CommitOptions struct { 28 Author *string 29 Changes []string 30 Comment *string 31 Format *string 32 Pause *bool 33 Squash *bool 34 Repo *string 35 Tag *string 36 } 37 38 //go:generate go run ../generator/generator.go AttachOptions 39 // AttachOptions are optional options for attaching to containers 40 type AttachOptions struct { 41 DetachKeys *string // Keys to detach from running container 42 Logs *bool // Flag to return all logs from container when true 43 Stream *bool // Flag only return container logs when false and Logs is true 44 } 45 46 //go:generate go run ../generator/generator.go CheckpointOptions 47 // CheckpointOptions are optional options for checkpointing containers 48 type CheckpointOptions struct { 49 Export *string 50 CreateImage *string 51 IgnoreRootfs *bool 52 Keep *bool 53 LeaveRunning *bool 54 TCPEstablished *bool 55 PrintStats *bool 56 PreCheckpoint *bool 57 WithPrevious *bool 58 FileLocks *bool 59 } 60 61 //go:generate go run ../generator/generator.go RestoreOptions 62 // RestoreOptions are optional options for restoring containers 63 type RestoreOptions struct { 64 IgnoreRootfs *bool 65 IgnoreVolumes *bool 66 IgnoreStaticIP *bool 67 IgnoreStaticMAC *bool 68 // ImportAchive is the path to an archive which contains the checkpoint data. 69 // 70 // Deprecated: Use ImportArchive instead. This field name is a typo and 71 // will be removed in a future major release. 72 ImportAchive *string 73 // ImportArchive is the path to an archive which contains the checkpoint data. 74 // ImportArchive is preferred over ImportAchive when both are set. 75 ImportArchive *string 76 Keep *bool 77 Name *string 78 TCPEstablished *bool 79 Pod *string 80 PrintStats *bool 81 PublishPorts []string 82 FileLocks *bool 83 } 84 85 //go:generate go run ../generator/generator.go CreateOptions 86 // CreateOptions are optional options for creating containers 87 type CreateOptions struct{} 88 89 //go:generate go run ../generator/generator.go DiffOptions 90 // DiffOptions are optional options for creating containers 91 type DiffOptions struct { 92 // By the default diff will compare against the parent layer. Change the Parent if you want to compare against something else. 93 Parent *string 94 // Change the type the backend should match. This can be set to "all", "container" or "image". 95 DiffType *string 96 } 97 98 //go:generate go run ../generator/generator.go ExecInspectOptions 99 // ExecInspectOptions are optional options for inspecting 100 // exec sessions 101 type ExecInspectOptions struct{} 102 103 //go:generate go run ../generator/generator.go ExecStartOptions 104 // ExecStartOptions are optional options for starting 105 // exec sessions 106 type ExecStartOptions struct { 107 } 108 109 //go:generate go run ../generator/generator.go HealthCheckOptions 110 // HealthCheckOptions are optional options for checking 111 // the health of a container 112 type HealthCheckOptions struct{} 113 114 //go:generate go run ../generator/generator.go MountOptions 115 // MountOptions are optional options for mounting 116 // containers 117 type MountOptions struct{} 118 119 //go:generate go run ../generator/generator.go UnmountOptions 120 // UnmountOptions are optional options for unmounting 121 // containers 122 type UnmountOptions struct{} 123 124 //go:generate go run ../generator/generator.go MountedContainerPathsOptions 125 // MountedContainerPathsOptions are optional options for getting 126 // container mount paths 127 type MountedContainerPathsOptions struct{} 128 129 //go:generate go run ../generator/generator.go ListOptions 130 // ListOptions are optional options for listing containers 131 type ListOptions struct { 132 All *bool 133 External *bool 134 Filters map[string][]string 135 Last *int 136 Namespace *bool 137 Size *bool 138 Sync *bool 139 } 140 141 //go:generate go run ../generator/generator.go PruneOptions 142 // PruneOptions are optional options for pruning containers 143 type PruneOptions struct { 144 Filters map[string][]string 145 } 146 147 //go:generate go run ../generator/generator.go RemoveOptions 148 // RemoveOptions are optional options for removing containers 149 type RemoveOptions struct { 150 Depend *bool 151 Ignore *bool 152 Force *bool 153 Volumes *bool 154 Timeout *uint 155 } 156 157 //go:generate go run ../generator/generator.go InspectOptions 158 // InspectOptions are optional options for inspecting containers 159 type InspectOptions struct { 160 Size *bool 161 } 162 163 //go:generate go run ../generator/generator.go KillOptions 164 // KillOptions are optional options for killing containers 165 type KillOptions struct { 166 Signal *string 167 } 168 169 //go:generate go run ../generator/generator.go PauseOptions 170 // PauseOptions are optional options for pausing containers 171 type PauseOptions struct{} 172 173 //go:generate go run ../generator/generator.go RestartOptions 174 // RestartOptions are optional options for restarting containers 175 type RestartOptions struct { 176 Timeout *int 177 } 178 179 //go:generate go run ../generator/generator.go StartOptions 180 // StartOptions are optional options for starting containers 181 type StartOptions struct { 182 DetachKeys *string 183 Recursive *bool 184 } 185 186 //go:generate go run ../generator/generator.go StatsOptions 187 // StatsOptions are optional options for getting stats on containers 188 type StatsOptions struct { 189 Stream *bool 190 Interval *int 191 } 192 193 //go:generate go run ../generator/generator.go TopOptions 194 // TopOptions are optional options for getting running 195 // processes in containers 196 type TopOptions struct { 197 Descriptors *[]string 198 } 199 200 //go:generate go run ../generator/generator.go UnpauseOptions 201 // UnpauseOptions are optional options for unpausing containers 202 type UnpauseOptions struct{} 203 204 //go:generate go run ../generator/generator.go WaitOptions 205 // WaitOptions are optional options for waiting on containers 206 type WaitOptions struct { 207 Condition []define.ContainerStatus 208 Interval *string 209 } 210 211 //go:generate go run ../generator/generator.go StopOptions 212 // StopOptions are optional options for stopping containers 213 type StopOptions struct { 214 Ignore *bool 215 Timeout *uint 216 } 217 218 //go:generate go run ../generator/generator.go ExportOptions 219 // ExportOptions are optional options for exporting containers 220 type ExportOptions struct{} 221 222 //go:generate go run ../generator/generator.go InitOptions 223 // InitOptions are optional options for initing containers 224 type InitOptions struct{} 225 226 //go:generate go run ../generator/generator.go ShouldRestartOptions 227 // ShouldRestartOptions 228 type ShouldRestartOptions struct{} 229 230 //go:generate go run ../generator/generator.go RenameOptions 231 // RenameOptions are options for renaming containers. 232 // The Name field is required. 233 type RenameOptions struct { 234 Name *string 235 } 236 237 //go:generate go run ../generator/generator.go ResizeTTYOptions 238 // ResizeTTYOptions are optional options for resizing 239 // container TTYs 240 type ResizeTTYOptions struct { 241 Height *int 242 Width *int 243 Running *bool 244 } 245 246 //go:generate go run ../generator/generator.go ResizeExecTTYOptions 247 // ResizeExecTTYOptions are optional options for resizing 248 // container ExecTTYs 249 type ResizeExecTTYOptions struct { 250 Height *int 251 Width *int 252 } 253 254 //go:generate go run ../generator/generator.go ExecStartAndAttachOptions 255 // ExecStartAndAttachOptions are optional options for resizing 256 // container ExecTTYs 257 type ExecStartAndAttachOptions struct { 258 // OutputStream will be attached to container's STDOUT 259 OutputStream *io.WriteCloser 260 // ErrorStream will be attached to container's STDERR 261 ErrorStream *io.WriteCloser 262 // InputStream will be attached to container's STDIN 263 InputStream *bufio.Reader 264 // AttachOutput is whether to attach to STDOUT 265 // If false, stdout will not be attached 266 AttachOutput *bool 267 // AttachError is whether to attach to STDERR 268 // If false, stdout will not be attached 269 AttachError *bool 270 // AttachInput is whether to attach to STDIN 271 // If false, stdout will not be attached 272 AttachInput *bool 273 } 274 275 //go:generate go run ../generator/generator.go ExistsOptions 276 // ExistsOptions are optional options for checking if a container exists 277 type ExistsOptions struct { 278 // External checks for containers created outside of Podman 279 External *bool 280 } 281 282 //go:generate go run ../generator/generator.go CopyOptions 283 // CopyOptions are options for copying to containers. 284 type CopyOptions struct { 285 // If used with CopyFromArchive and set to true it will change ownership of files from the source tar archive 286 // to the primary uid/gid of the target container. 287 Chown *bool `schema:"copyUIDGID"` 288 // Map to translate path names. 289 Rename map[string]string 290 }