descriptor

package
v1.15.13 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package descriptor implements a comparable descriptor and related de-duplication utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToOCI

func ToOCI(desc Descriptor) ocispec.Descriptor

ToOCI converts the minimal descriptor to a regular OCI descriptor.

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 minimum information to describe the disposition of targeted content. Since it only has strings and integers, Descriptor is a comparable struct.

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