forked from moby/buildkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exporter/image/exptypes: Make strongly typed
Signed-off-by: Paweł Gronowski <[email protected]>
- Loading branch information
Showing
5 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,73 @@ | ||
package exptypes | ||
|
||
type ImageExporterOptKey string | ||
|
||
// Options keys supported by the image exporter output. | ||
var ( | ||
// Name of the image. | ||
// Value: string | ||
OptKeyName = "name" | ||
OptKeyName ImageExporterOptKey = "name" | ||
|
||
// Push after creating image. | ||
// Value: bool <true|false> | ||
OptKeyPush = "push" | ||
OptKeyPush ImageExporterOptKey = "push" | ||
|
||
// Push unnamed image. | ||
// Value: bool <true|false> | ||
OptKeyPushByDigest = "push-by-digest" | ||
OptKeyPushByDigest ImageExporterOptKey = "push-by-digest" | ||
|
||
// Allow pushing to insecure HTTP registry. | ||
// Value: bool <true|false> | ||
OptKeyInsecure = "registry.insecure" | ||
OptKeyInsecure ImageExporterOptKey = "registry.insecure" | ||
|
||
// Unpack image after it's created (containerd). | ||
// Value: bool <true|false> | ||
OptKeyUnpack = "unpack" | ||
OptKeyUnpack ImageExporterOptKey = "unpack" | ||
|
||
// Fallback image name prefix if image name isn't provided. | ||
// If used, image will be named as <value>@<digest> | ||
// Value: string | ||
OptKeyDanglingPrefix = "dangling-name-prefix" | ||
OptKeyDanglingPrefix ImageExporterOptKey = "dangling-name-prefix" | ||
|
||
// Creates additional image name with format <name>@<digest> | ||
// Value: bool <true|false> | ||
OptKeyNameCanonical = "name-canonical" | ||
OptKeyNameCanonical ImageExporterOptKey = "name-canonical" | ||
|
||
// Store the resulting image along with all of the content it references. | ||
// Ignored if the worker doesn't have image store (e.g. OCI worker). | ||
// Value: bool <true|false> | ||
OptKeyStore = "store" | ||
OptKeyStore ImageExporterOptKey = "store" | ||
|
||
// Use OCI mediatypes instead of Docker in JSON configs. | ||
// Value: bool <true|false> | ||
OptKeyOCITypes = "oci-mediatypes" | ||
OptKeyOCITypes ImageExporterOptKey = "oci-mediatypes" | ||
|
||
// Force attestation to be attached. | ||
// Value: bool <true|false> | ||
OptKeyForceInlineAttestations = "attestation-inline" | ||
OptKeyForceInlineAttestations ImageExporterOptKey = "attestation-inline" | ||
|
||
// Mark layers as non-distributable if they are found to use a | ||
// non-distributable media type. When this option is not set, the exporter | ||
// will change the media type of the layer to a distributable one. | ||
// Value: bool <true|false> | ||
OptKeyPreferNondistLayers = "prefer-nondist-layers" | ||
OptKeyPreferNondistLayers ImageExporterOptKey = "prefer-nondist-layers" | ||
|
||
// Clamp produced timestamps. For more information see the | ||
// SOURCE_DATE_EPOCH specification. | ||
// Value: int (number of seconds since Unix epoch) | ||
OptKeySourceDateEpoch = "source-date-epoch" | ||
OptKeySourceDateEpoch ImageExporterOptKey = "source-date-epoch" | ||
|
||
// Compression type for newly created and cached layers. | ||
// estargz should be used with OptKeyOCITypes set to true. | ||
// Value: string <uncompressed|gzip|estargz|zstd> | ||
OptKeyLayerCompression = "compression" | ||
OptKeyLayerCompression ImageExporterOptKey = "compression" | ||
|
||
// Force compression on all (including existing) layers. | ||
// Value: bool <true|false> | ||
OptKeyForceCompression = "force-compression" | ||
OptKeyForceCompression ImageExporterOptKey = "force-compression" | ||
|
||
// Compression level | ||
// Value: int (0-9) for gzip and estargz | ||
// Value: int (0-22) for zstd | ||
OptKeyCompressionLevel = "compression-level" | ||
OptKeyCompressionLevel ImageExporterOptKey = "compression-level" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters