exptypes

package
v0.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 204

Documentation

Index

Constants

View Source
const (
	AnnotationIndex              = "index"
	AnnotationIndexDescriptor    = "index-descriptor"
	AnnotationManifest           = "manifest"
	AnnotationManifestDescriptor = "manifest-descriptor"
)
View Source
const (
	ExporterConfigDigestKey      = "config.digest"
	ExporterImageDigestKey       = "containerimage.digest"
	ExporterImageConfigKey       = "containerimage.config"
	ExporterImageConfigDigestKey = "containerimage.config.digest"
	ExporterImageDescriptorKey   = "containerimage.descriptor"
	ExporterImageBaseConfigKey   = "containerimage.base.config"
	ExporterPlatformsKey         = "refs.platforms"
)

Variables

KnownRefMetadataKeys are the subset of exporter keys that can be suffixed by a platform to become platform specific

Functions

func AnnotationIndexDescriptorKey added in v0.11.0

func AnnotationIndexDescriptorKey(key string) string

func AnnotationIndexKey added in v0.11.0

func AnnotationIndexKey(key string) string

func AnnotationManifestDescriptorKey added in v0.11.0

func AnnotationManifestDescriptorKey(p *ocispecs.Platform, key string) string

func AnnotationManifestKey added in v0.11.0

func AnnotationManifestKey(p *ocispecs.Platform, key string) string

func ParseKey added in v0.11.0

func ParseKey(meta map[string][]byte, key string, p *Platform) []byte

Types

type AnnotationKey added in v0.11.0

type AnnotationKey struct {
	Type     string
	Platform *ocispecs.Platform
	Key      string
}

func ParseAnnotationKey added in v0.11.0

func ParseAnnotationKey(result string) (AnnotationKey, bool, error)

func (AnnotationKey) PlatformString added in v0.11.0

func (k AnnotationKey) PlatformString() string

func (AnnotationKey) String added in v0.11.0

func (k AnnotationKey) String() string

type ImageExporterOptKey added in v0.12.0

type ImageExporterOptKey string
var (
	// Name of the image.
	// Value: string
	OptKeyName ImageExporterOptKey = "name"

	// Push after creating image.
	// Value: bool <true|false>
	OptKeyPush ImageExporterOptKey = "push"

	// Push unnamed image.
	// Value: bool <true|false>
	OptKeyPushByDigest ImageExporterOptKey = "push-by-digest"

	// Allow pushing to insecure HTTP registry.
	// Value: bool <true|false>
	OptKeyInsecure ImageExporterOptKey = "registry.insecure"

	// Unpack image after it's created (containerd).
	// Value: bool <true|false>
	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 ImageExporterOptKey = "dangling-name-prefix"

	// Creates additional image name with format <name>@<digest>
	// Value: bool <true|false>
	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 ImageExporterOptKey = "store"

	// Use OCI mediatypes instead of Docker in JSON configs.
	// Value: bool <true|false>
	OptKeyOCITypes ImageExporterOptKey = "oci-mediatypes"

	// Force attestation to be attached.
	// Value: bool <true|false>
	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 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 ImageExporterOptKey = ImageExporterOptKey(commonexptypes.OptKeySourceDateEpoch)

	// Compression type for newly created and cached layers.
	// estargz should be used with OptKeyOCITypes set to true.
	// Value: string <uncompressed|gzip|estargz|zstd>
	OptKeyLayerCompression ImageExporterOptKey = "compression"

	// Force compression on all (including existing) layers.
	// Value: bool <true|false>
	OptKeyForceCompression ImageExporterOptKey = "force-compression"

	// Compression level
	// Value: int (0-9) for gzip and estargz
	// Value: int (0-22) for zstd
	OptKeyCompressionLevel ImageExporterOptKey = "compression-level"

	// Rewrite timestamps in layers to match SOURCE_DATE_EPOCH
	// Value: bool <true|false>
	OptKeyRewriteTimestamp ImageExporterOptKey = "rewrite-timestamp"
)

Options keys supported by the image exporter output.

type InlineCache added in v0.13.0

type InlineCache func(ctx context.Context) (*result.Result[*InlineCacheEntry], error)

type InlineCacheEntry added in v0.13.0

type InlineCacheEntry struct {
	Data []byte
}

type Platform

type Platform struct {
	ID       string
	Platform ocispecs.Platform
}

type Platforms

type Platforms struct {
	Platforms []Platform
}

func ParsePlatforms added in v0.11.0

func ParsePlatforms(meta map[string][]byte) (Platforms, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL