ocischema

package
v0.0.0-...-791c70a Latest Latest
Warning

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

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

Documentation

Overview

Package ocischema implements the OCI image manifest schema.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalImageManifest

func UnmarshalImageManifest(b []byte) (manifest.Manifest, imgspecv1.Descriptor, error)

UnmarshalImageManifest unmarshals an image manifest.

func UnmarshalIndexManifest

func UnmarshalIndexManifest(b []byte) (manifest.Manifest, imgspecv1.Descriptor, error)

UnmarshalIndexManifest unmarshals an image index manifest.

Types

type DeserializedIndexManifest

type DeserializedIndexManifest struct {
	IndexManifest
	// contains filtered or unexported fields
}

DeserializedIndexManifest wraps IndexManifest with a copy of the original JSON.

func (*DeserializedIndexManifest) MarshalJSON

func (m *DeserializedIndexManifest) MarshalJSON() ([]byte, error)

MarshalJSON returns the contents of canonical. If canonical is empty, marshals the inner contents.

func (DeserializedIndexManifest) Payload

func (m DeserializedIndexManifest) Payload() ([]byte, error)

Payload returns the raw content of the manifest list. The contents can be used to calculate the content identifier.

func (*DeserializedIndexManifest) UnmarshalJSON

func (m *DeserializedIndexManifest) UnmarshalJSON(b []byte) error

UnmarshalJSON populates a new ManifestList struct from JSON data.

type DeserializedManifest

type DeserializedManifest struct {
	Manifest
	// contains filtered or unexported fields
}

DeserializedManifest wraps Manifest with a copy of the original JSON.

func (DeserializedManifest) Config

Config returns a descriptor of the separate image config blob.

func (DeserializedManifest) Layers

Layers returns a list of LayerDescriptors of layers referenced by the image. Ordered from the root layer first (oldest) to the top layer at last (latest).

func (*DeserializedManifest) MarshalJSON

func (m *DeserializedManifest) MarshalJSON() ([]byte, error)

MarshalJSON returns the contents of canonical. If canonical is empty, marshals the inner contents.

func (DeserializedManifest) Payload

func (m DeserializedManifest) Payload() ([]byte, error)

Payload returns the raw content of the manifest list. The contents can be used to calculate the content identifier.

func (*DeserializedManifest) UnmarshalJSON

func (m *DeserializedManifest) UnmarshalJSON(b []byte) error

UnmarshalJSON populates a new ManifestList struct from JSON data.

type IndexManifest

type IndexManifest struct {
	imgspecv1.Index
}

IndexManifest wraps imgspecv1.Index.

func (IndexManifest) Manifests

func (m IndexManifest) Manifests() []imgspecv1.Descriptor

Manifests returns a list of all child manifest descriptors.

func (IndexManifest) MediaType

func (m IndexManifest) MediaType() string

MediaType returns the media type of current manifest object.

func (IndexManifest) References

func (m IndexManifest) References() []imgspecv1.Descriptor

References returns the distribution descriptors for the referenced image manifests.

type Manifest

type Manifest struct {
	imgspecv1.Manifest
}

Manifest wraps imgspecv1.Manifest.

func (Manifest) MediaType

func (m Manifest) MediaType() string

MediaType returns the media type of current manifest object.

func (Manifest) References

func (m Manifest) References() []imgspecv1.Descriptor

References returns a list of objects which make up this manifest. A reference is anything which can be represented by a imgspecv1.Descriptor. These can consist of layers, resources or other manifests.

While no particular order is required, implementations should return them from highest to lowest priority. For example, one might want to return the base layer before the top layer.

Jump to

Keyboard shortcuts

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