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 ¶
func Plain(desc ocispec.Descriptor) ocispec.Descriptor
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.
Click to show internal directories.
Click to hide internal directories.