|
1 | 1 | package exptypes
|
2 | 2 |
|
| 3 | +type ImageExporterOptKey string |
| 4 | + |
3 | 5 | // Options keys supported by the image exporter output.
|
4 | 6 | var (
|
5 | 7 | // Name of the image.
|
6 | 8 | // Value: string
|
7 |
| - OptKeyName = "name" |
| 9 | + OptKeyName ImageExporterOptKey = "name" |
8 | 10 |
|
9 | 11 | // Push after creating image.
|
10 | 12 | // Value: bool <true|false>
|
11 |
| - OptKeyPush = "push" |
| 13 | + OptKeyPush ImageExporterOptKey = "push" |
12 | 14 |
|
13 | 15 | // Push unnamed image.
|
14 | 16 | // Value: bool <true|false>
|
15 |
| - OptKeyPushByDigest = "push-by-digest" |
| 17 | + OptKeyPushByDigest ImageExporterOptKey = "push-by-digest" |
16 | 18 |
|
17 | 19 | // Allow pushing to insecure HTTP registry.
|
18 | 20 | // Value: bool <true|false>
|
19 |
| - OptKeyInsecure = "registry.insecure" |
| 21 | + OptKeyInsecure ImageExporterOptKey = "registry.insecure" |
20 | 22 |
|
21 | 23 | // Unpack image after it's created (containerd).
|
22 | 24 | // Value: bool <true|false>
|
23 |
| - OptKeyUnpack = "unpack" |
| 25 | + OptKeyUnpack ImageExporterOptKey = "unpack" |
24 | 26 |
|
25 | 27 | // Fallback image name prefix if image name isn't provided.
|
26 | 28 | // If used, image will be named as <value>@<digest>
|
27 | 29 | // Value: string
|
28 |
| - OptKeyDanglingPrefix = "dangling-name-prefix" |
| 30 | + OptKeyDanglingPrefix ImageExporterOptKey = "dangling-name-prefix" |
29 | 31 |
|
30 | 32 | // Creates additional image name with format <name>@<digest>
|
31 | 33 | // Value: bool <true|false>
|
32 |
| - OptKeyNameCanonical = "name-canonical" |
| 34 | + OptKeyNameCanonical ImageExporterOptKey = "name-canonical" |
33 | 35 |
|
34 | 36 | // Store the resulting image along with all of the content it references.
|
35 | 37 | // Ignored if the worker doesn't have image store (e.g. OCI worker).
|
36 | 38 | // Value: bool <true|false>
|
37 |
| - OptKeyStore = "store" |
| 39 | + OptKeyStore ImageExporterOptKey = "store" |
38 | 40 |
|
39 | 41 | // Use OCI mediatypes instead of Docker in JSON configs.
|
40 | 42 | // Value: bool <true|false>
|
41 |
| - OptKeyOCITypes = "oci-mediatypes" |
| 43 | + OptKeyOCITypes ImageExporterOptKey = "oci-mediatypes" |
42 | 44 |
|
43 | 45 | // Force attestation to be attached.
|
44 | 46 | // Value: bool <true|false>
|
45 |
| - OptKeyForceInlineAttestations = "attestation-inline" |
| 47 | + OptKeyForceInlineAttestations ImageExporterOptKey = "attestation-inline" |
46 | 48 |
|
47 | 49 | // Mark layers as non-distributable if they are found to use a
|
48 | 50 | // non-distributable media type. When this option is not set, the exporter
|
49 | 51 | // will change the media type of the layer to a distributable one.
|
50 | 52 | // Value: bool <true|false>
|
51 |
| - OptKeyPreferNondistLayers = "prefer-nondist-layers" |
| 53 | + OptKeyPreferNondistLayers ImageExporterOptKey = "prefer-nondist-layers" |
52 | 54 |
|
53 | 55 | // Clamp produced timestamps. For more information see the
|
54 | 56 | // SOURCE_DATE_EPOCH specification.
|
55 | 57 | // Value: int (number of seconds since Unix epoch)
|
56 |
| - OptKeySourceDateEpoch = "source-date-epoch" |
| 58 | + OptKeySourceDateEpoch ImageExporterOptKey = "source-date-epoch" |
57 | 59 |
|
58 | 60 | // Compression type for newly created and cached layers.
|
59 | 61 | // estargz should be used with OptKeyOCITypes set to true.
|
60 | 62 | // Value: string <uncompressed|gzip|estargz|zstd>
|
61 |
| - OptKeyLayerCompression = "compression" |
| 63 | + OptKeyLayerCompression ImageExporterOptKey = "compression" |
62 | 64 |
|
63 | 65 | // Force compression on all (including existing) layers.
|
64 | 66 | // Value: bool <true|false>
|
65 |
| - OptKeyForceCompression = "force-compression" |
| 67 | + OptKeyForceCompression ImageExporterOptKey = "force-compression" |
66 | 68 |
|
67 | 69 | // Compression level
|
68 | 70 | // Value: int (0-9) for gzip and estargz
|
69 | 71 | // Value: int (0-22) for zstd
|
70 |
| - OptKeyCompressionLevel = "compression-level" |
| 72 | + OptKeyCompressionLevel ImageExporterOptKey = "compression-level" |
71 | 73 | )
|
0 commit comments