manifests

package
v0.59.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDigestNotFound is returned when we look for an image instance
	// with a particular digest in a list or index, and fail to find it.
	ErrDigestNotFound = errors.New("no image instance matching the specified digest was found in the list or index")
	// ErrManifestTypeNotSupported is returned when we attempt to parse a
	// manifest with a known MIME type as a list or index, or when we attempt
	// to serialize a list or index to a manifest with a MIME type that we
	// don't know how to encode.
	ErrManifestTypeNotSupported = errors.New("manifest type not supported")
)

Functions

This section is empty.

Types

type List

type List interface {
	AddInstance(manifestDigest digest.Digest, manifestSize int64, manifestType, os, architecture, osVersion string, osFeatures []string, variant string, features []string, annotations []string) error
	Remove(instanceDigest digest.Digest) error
	SetURLs(instanceDigest digest.Digest, urls []string) error
	URLs(instanceDigest digest.Digest) ([]string, error)
	ClearAnnotations(instanceDigest *digest.Digest) error
	SetAnnotations(instanceDigest *digest.Digest, annotations map[string]string) error
	Annotations(instanceDigest *digest.Digest) (map[string]string, error)
	SetOS(instanceDigest digest.Digest, os string) error
	OS(instanceDigest digest.Digest) (string, error)
	SetArchitecture(instanceDigest digest.Digest, arch string) error
	Architecture(instanceDigest digest.Digest) (string, error)
	SetOSVersion(instanceDigest digest.Digest, osVersion string) error
	OSVersion(instanceDigest digest.Digest) (string, error)
	SetVariant(instanceDigest digest.Digest, variant string) error
	Variant(instanceDigest digest.Digest) (string, error)
	SetFeatures(instanceDigest digest.Digest, features []string) error
	Features(instanceDigest digest.Digest) ([]string, error)
	SetOSFeatures(instanceDigest digest.Digest, osFeatures []string) error
	OSFeatures(instanceDigest digest.Digest) ([]string, error)
	SetMediaType(instanceDigest digest.Digest, mediaType string) error
	MediaType(instanceDigest digest.Digest) (string, error)
	SetArtifactType(instanceDigest *digest.Digest, artifactType string) error
	ArtifactType(instanceDigest *digest.Digest) (string, error)
	SetSubject(subject *v1.Descriptor) error
	Subject() (*v1.Descriptor, error)
	Serialize(mimeType string) ([]byte, error)
	Instances() []digest.Digest
	OCIv1() *v1.Index
	Docker() *manifest.Schema2List
	// contains filtered or unexported methods
}

List is a generic interface for manipulating a manifest list or an image index.

func Create

func Create() List

Create creates a new list.

func FromBlob

func FromBlob(manifestBytes []byte) (List, error)

FromBlob builds a list from an encoded manifest list or image index.

Jump to

Keyboard shortcuts

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