dockerschema1

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: 10 Imported by: 0

Documentation

Overview

Package dockerschema1 provides a type for parsing and serializing Docker Schema 1 manifest files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalImageManifest

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

UnmarshalImageManifest parses a Docker Schema 1 manifest file.

Types

type FSLayer deprecated

type FSLayer struct {
	// BlobSum is the tarsum of the referenced filesystem image layer
	BlobSum digest.Digest `json:"blobSum"`
}

FSLayer is a container struct for BlobSums defined in an image manifest.

Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.

type History deprecated

type History struct {
	// V1Compatibility is the raw v1 compatibility information
	V1Compatibility string `json:"v1Compatibility"`
}

History stores unstructured v1 compatibility information.

Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.

type Manifest deprecated

type Manifest struct {
	manifest.Versioned

	// Name is the name of the image's repository
	Name string `json:"name"`

	// Tag is the tag of the image specified by this manifest
	Tag string `json:"tag"`

	// Architecture is the host architecture on which this image is intended to
	// run
	Architecture string `json:"architecture"`

	// FSLayers is a list of filesystem layer blobSums contained in this image
	FSLayers []FSLayer `json:"fsLayers"`

	// History is a list of unstructured historical data for v1 compatibility
	History []History `json:"history"`
}

Manifest provides the base accessible fields for working with V2 image format in the registry.

Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.

type SignedManifest deprecated

type SignedManifest struct {
	Manifest

	// Canonical is the canonical byte representation of the ImageManifest,
	// without any attached signatures. The manifest byte
	// representation cannot change or it will have to be re-signed.
	Canonical []byte `json:"-"`

	// ExtractedV1Compatibility is the V1Compatibility parsed from History.
	//
	// NOTE: Keep this in sync with History! Does not contain the full image
	// config (Schema2V1Image)
	ExtractedV1Compatibility []V1Compatibility `json:"-"`
	// contains filtered or unexported fields
}

SignedManifest provides an envelope for a signed image manifest, including the format sensitive raw bytes.

Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.

func (SignedManifest) Config

func (m SignedManifest) Config() imgspecv1.Descriptor

Config returns a descriptor of the separate image config blob.

func (SignedManifest) 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 (*SignedManifest) MarshalJSON

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

MarshalJSON returns the contents of raw. If Raw is nil, marshals the inner contents. Applications requiring a marshaled signed manifest should simply use Raw directly, since the the content produced by json.Marshal will be compacted and will fail signature checks.

func (SignedManifest) MediaType

func (m SignedManifest) MediaType() string

MediaType returns the media type of current manifest object.

func (SignedManifest) Payload

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

Payload returns the signed content of the signed manifest.

func (SignedManifest) References

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

References returns the descriptors of this manifests references.

func (*SignedManifest) Signatures

func (m *SignedManifest) Signatures() ([][]byte, error)

Signatures returns the signatures as provided by (*libtrust.JSONSignature).Signatures. The byte slices are opaque jws signatures.

func (*SignedManifest) UnmarshalJSON

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

UnmarshalJSON populates a new SignedManifest struct from JSON data.

type V1Compatibility deprecated

type V1Compatibility struct {
	ID              string                         `json:"id"`
	Parent          string                         `json:"parent,omitempty"`
	Comment         string                         `json:"comment,omitempty"`
	Created         time.Time                      `json:"created"`
	ContainerConfig V1CompatibilityContainerConfig `json:"container_config,omitempty"`
	Author          string                         `json:"author,omitempty"`
	ThrowAway       bool                           `json:"throwaway,omitempty"`
}

V1Compatibility is a v1Compatibility in docker/distribution schema 1.

Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.

type V1CompatibilityContainerConfig deprecated

type V1CompatibilityContainerConfig struct {
	Cmd []string
}

V1CompatibilityContainerConfig is a v1Compatibility container config in docker/distribution schema 1.

Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.

Jump to

Keyboard shortcuts

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