descriptor

package
v2.0.0-...-c472316 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMediaType string = "application/octet-stream"

DefaultMediaType is the media type used when no media type is specified.

Variables

This section is empty.

Functions

func IsForeignLayer

func IsForeignLayer(desc ocispec.Descriptor) bool

IsForeignLayer checks if a descriptor describes a foreign layer.

func IsManifest

func IsManifest(desc ocispec.Descriptor) bool

IsManifest checks if a descriptor describes a manifest.

func Plain

Plain returns a plain descriptor that contains only MediaType, Digest and Size.

Types

type Descriptor

type Descriptor struct {
	// MediaType is the media type of the object this schema refers to.
	MediaType string `json:"mediaType,omitempty"`

	// Digest is the digest of the targeted content.
	Digest digest.Digest `json:"digest"`

	// Size specifies the size in bytes of the blob.
	Size int64 `json:"size"`
}

Descriptor contains the minimun information to describe the disposition of targeted content. Since it only has strings and integers, Descriptor is a comparable struct.

var Empty Descriptor

Empty is an empty descriptor

func FromOCI

func FromOCI(desc ocispec.Descriptor) Descriptor

FromOCI shrinks the OCI descriptor to the minimum.

Jump to

Keyboard shortcuts

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