github.com/containers/podman/v4@v4.9.4/pkg/bindings/images/types.go (about) 1 package images 2 3 import ( 4 "io" 5 6 buildahDefine "github.com/containers/buildah/define" 7 ) 8 9 // RemoveOptions are optional options for image removal 10 // 11 //go:generate go run ../generator/generator.go RemoveOptions 12 type RemoveOptions struct { 13 // All removes all images 14 All *bool 15 // Forces removes all containers based on the image 16 Force *bool 17 // Ignore if a specified image does not exist and do not throw an error. 18 Ignore *bool 19 // Confirms if given name is a manifest list and removes it, otherwise returns error. 20 LookupManifest *bool 21 // Does not remove dangling parent images 22 NoPrune *bool 23 } 24 25 // DiffOptions are optional options image diffs 26 // 27 //go:generate go run ../generator/generator.go DiffOptions 28 type DiffOptions struct { 29 // By the default diff will compare against the parent layer. Change the Parent if you want to compare against something else. 30 Parent *string 31 // Change the type the backend should match. This can be set to "all", "container" or "image". 32 DiffType *string 33 } 34 35 // ListOptions are optional options for listing images 36 // 37 //go:generate go run ../generator/generator.go ListOptions 38 type ListOptions struct { 39 // All lists all image in the image store including dangling images 40 All *bool 41 // filters that can be used to get a more specific list of images 42 Filters map[string][]string 43 } 44 45 // GetOptions are optional options for inspecting an image 46 // 47 //go:generate go run ../generator/generator.go GetOptions 48 type GetOptions struct { 49 // Size computes the amount of storage the image consumes 50 Size *bool 51 } 52 53 // TreeOptions are optional options for a tree-based representation 54 // of the image 55 // 56 //go:generate go run ../generator/generator.go TreeOptions 57 type TreeOptions struct { 58 // WhatRequires ... 59 WhatRequires *bool 60 } 61 62 // HistoryOptions are optional options image history 63 // 64 //go:generate go run ../generator/generator.go HistoryOptions 65 type HistoryOptions struct { 66 } 67 68 // LoadOptions are optional options for loading an image 69 // 70 //go:generate go run ../generator/generator.go LoadOptions 71 type LoadOptions struct { 72 // Reference is the name of the loaded image 73 Reference *string 74 } 75 76 // ExportOptions are optional options for exporting images 77 // 78 //go:generate go run ../generator/generator.go ExportOptions 79 type ExportOptions struct { 80 // Compress the image 81 Compress *bool 82 // Format of the output 83 Format *string 84 // Accept uncompressed layers when copying OCI images. 85 OciAcceptUncompressedLayers *bool 86 } 87 88 // PruneOptions are optional options for pruning images 89 // 90 //go:generate go run ../generator/generator.go PruneOptions 91 type PruneOptions struct { 92 // Prune all images 93 All *bool 94 // Prune images even when they're used by external containers 95 External *bool 96 // Filters to apply when pruning images 97 Filters map[string][]string 98 } 99 100 // TagOptions are optional options for tagging images 101 // 102 //go:generate go run ../generator/generator.go TagOptions 103 type TagOptions struct { 104 } 105 106 // UntagOptions are optional options for untagging images 107 // 108 //go:generate go run ../generator/generator.go UntagOptions 109 type UntagOptions struct { 110 } 111 112 // ImportOptions are optional options for importing images 113 // 114 //go:generate go run ../generator/generator.go ImportOptions 115 type ImportOptions struct { 116 // Changes to be applied to the image 117 Changes *[]string 118 // Message to be applied to the image 119 Message *string 120 // Reference is a tag to be applied to the image 121 Reference *string 122 // Url to option image to import. Cannot be used with the reader 123 URL *string 124 // OS for the imported image 125 OS *string 126 // Architecture for the imported image 127 Architecture *string 128 // Variant for the imported image 129 Variant *string 130 } 131 132 // PushOptions are optional options for importing images 133 // 134 //go:generate go run ../generator/generator.go PushOptions 135 type PushOptions struct { 136 // All indicates whether to push all images related to the image list 137 All *bool 138 // Authfile is the path to the authentication file. Ignored for remote 139 // calls. 140 Authfile *string 141 // Compress tarball image layers when pushing to a directory using the 'dir' transport. 142 Compress *bool 143 // CompressionFormat is the format to use for the compression of the blobs 144 CompressionFormat *string 145 // CompressionLevel is the level to use for the compression of the blobs 146 CompressionLevel *int 147 // ForceCompressionFormat ensures that the compression algorithm set in 148 // CompressionFormat is used exclusively, and blobs of other compression 149 // algorithms are not reused. 150 ForceCompressionFormat *bool 151 // Add existing instances with requested compression algorithms to manifest list 152 AddCompression []string 153 // Manifest type of the pushed image 154 Format *string 155 // Password for authenticating against the registry. 156 Password *string `schema:"-"` 157 // ProgressWriter is a writer where push progress are sent. 158 // Since API handler for image push is quiet by default, WithQuiet(false) is necessary for 159 // the writer to receive progress messages. 160 ProgressWriter *io.Writer `schema:"-"` 161 // SkipTLSVerify to skip HTTPS and certificate verification. 162 SkipTLSVerify *bool `schema:"-"` 163 // RemoveSignatures Discard any pre-existing signatures in the image. 164 RemoveSignatures *bool 165 // Username for authenticating against the registry. 166 Username *string `schema:"-"` 167 // Quiet can be specified to suppress progress when pushing. 168 Quiet *bool 169 170 // Manifest of the pushed image. Set by images.Push. 171 ManifestDigest *string 172 } 173 174 // SearchOptions are optional options for searching images on registries 175 // 176 //go:generate go run ../generator/generator.go SearchOptions 177 type SearchOptions struct { 178 // Authfile is the path to the authentication file. Ignored for remote 179 // calls. 180 Authfile *string 181 // Filters for the search results. 182 Filters map[string][]string 183 // Limit the number of results. 184 Limit *int 185 // SkipTLSVerify to skip HTTPS and certificate verification. 186 SkipTLSVerify *bool `schema:"-"` 187 // ListTags search the available tags of the repository 188 ListTags *bool 189 // Username for authenticating against the registry. 190 Username *string `schema:"-"` 191 // Password for authenticating against the registry. 192 Password *string `schema:"-"` 193 } 194 195 // PullOptions are optional options for pulling images 196 // 197 //go:generate go run ../generator/generator.go PullOptions 198 type PullOptions struct { 199 // AllTags can be specified to pull all tags of an image. Note 200 // that this only works if the image does not include a tag. 201 AllTags *bool 202 // Arch will overwrite the local architecture for image pulls. 203 Arch *string 204 // Authfile is the path to the authentication file. Ignored for remote 205 // calls. 206 Authfile *string 207 // OS will overwrite the local operating system (OS) for image 208 // pulls. 209 OS *string 210 // Policy is the pull policy. Supported values are "missing", "never", 211 // "newer", "always". An empty string defaults to "always". 212 Policy *string 213 // Password for authenticating against the registry. 214 Password *string `schema:"-"` 215 // ProgressWriter is a writer where pull progress are sent. 216 ProgressWriter *io.Writer `schema:"-"` 217 // Quiet can be specified to suppress pull progress when pulling. Ignored 218 // for remote calls. 219 Quiet *bool 220 // SkipTLSVerify to skip HTTPS and certificate verification. 221 SkipTLSVerify *bool `schema:"-"` 222 // Username for authenticating against the registry. 223 Username *string `schema:"-"` 224 // Variant will overwrite the local variant for image pulls. 225 Variant *string 226 } 227 228 // BuildOptions are optional options for building images 229 type BuildOptions struct { 230 buildahDefine.BuildOptions 231 } 232 233 // ExistsOptions are optional options for checking if an image exists 234 // 235 //go:generate go run ../generator/generator.go ExistsOptions 236 type ExistsOptions struct { 237 } 238 239 type ScpOptions struct { 240 Quiet *bool 241 Destination *string 242 }