Documentation
¶
Overview ¶
Package ocischema implements the OCI image manifest schema.
Index ¶
- func UnmarshalImageManifest(b []byte) (ocispec.Manifest, imgspecv1.Descriptor, error)
- func UnmarshalIndexManifest(b []byte) (ocispec.Manifest, imgspecv1.Descriptor, error)
- type DeserializedIndexManifest
- type DeserializedManifest
- func (m DeserializedManifest) Config() imgspecv1.Descriptor
- func (m DeserializedManifest) Layers() []manifest.LayerDescriptor
- func (m *DeserializedManifest) MarshalJSON() ([]byte, error)
- func (m DeserializedManifest) Payload() ([]byte, error)
- func (m *DeserializedManifest) UnmarshalJSON(b []byte) error
- type IndexManifest
- type Manifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalImageManifest ¶
UnmarshalImageManifest unmarshals an image manifest.
func UnmarshalIndexManifest ¶
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 ¶
func (m DeserializedManifest) Config() imgspecv1.Descriptor
Config returns a descriptor of the separate image config blob.
func (DeserializedManifest) Layers ¶
func (m DeserializedManifest) Layers() []manifest.LayerDescriptor
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 ¶
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 ¶
Manifest wraps imgspecv1.Manifest.
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.