Documentation ¶
Overview ¶
Package schema1 defines the manifest and json marshal/unmarshal for docker schema1
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ManifestSchemaVersion provides a pre-initialized version structure schema1 manifests. ManifestSchemaVersion = docker.Versioned{ SchemaVersion: 1, MediaType: types.MediaTypeDocker1Manifest, } // ManifestSignedSchemaVersion provides a pre-initialized version structure schema1 signed manifests. ManifestSignedSchemaVersion = docker.Versioned{ SchemaVersion: 1, MediaType: types.MediaTypeDocker1ManifestSigned, } )
Functions ¶
This section is empty.
Types ¶
type FSLayer ¶
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
type History ¶
type History struct { // V1Compatibility is the raw v1 compatibility information V1Compatibility string `json:"v1Compatibility"` }
History stores unstructured v1 compatibility information
type Manifest ¶
type Manifest struct { docker.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 defines the schema v1 docker manifest
type SignedManifest ¶
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:"-"` // contains filtered or unexported fields }
SignedManifest provides an envelope for a signed image manifest, including the format sensitive raw bytes.
func (*SignedManifest) MarshalJSON ¶
func (sm *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) Payload ¶
func (sm SignedManifest) Payload() (string, []byte, error)
Payload returns the signed content of the signed manifest.
func (*SignedManifest) Signatures ¶
func (sm *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 (sm *SignedManifest) UnmarshalJSON(b []byte) error
UnmarshalJSON populates a new SignedManifest struct from JSON data.