Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HeaderAPIVersion is the header used to announce to clients which API version the server supports HeaderAPIVersion = "Docker-Distribution-API-Version" // APIVersion is the version of the API that the server supports APIVersion = "registry/2.0" // HeaderContentDigest is the header used to pass the digest HeaderContentDigest = "Docker-Content-Digest" // HeaderUploadUUID is used to pass the upload UUID back to the client HeaderUploadUUID = "Docker-Upload-UUID" // Docker MIME types for responses MIMEManifestV1 = "application/vnd.docker.distribution.manifest.v1+prettyjws" MIMEManifestV2 = "application/vnd.docker.distribution.manifest.v2+json" MIMEManifestListV2 = "application/vnd.docker.distribution.manifest.list.v2+json" MIMEImageManifestV1 = "application/json application/vnd.oci.image.manifest.v1+json" MIMEImageIndexV1 = "application/vnd.oci.image.index.v1+json" )
Variables ¶
View Source
var ( CodeBlobUnknown = "BLOB_UNKNOWN" CodeBlobUploadInvalid = "BLOB_UPLOAD_INVALID" CodeBlobUploadUnknown = "BLOB_UPLOAD_UNKNOWN" CodeDigestInvalid = "DIGEST_INVALID" CodeManifestBlobUnknown = "MANIFEST_BLOB_UNKNOWN" CodeManifestInvalid = "MANIFEST_INVALID" CodeManifestUnknown = "MANIFEST_UNKNOWN" CodeManifestUnverified = "MANIFEST_UNVERIFIED" CodeNameInvalid = "NAME_INVALID" CodeNameUnknown = "NAME_UNKNOWN" CodeSizeInvalid = "SIZE_INVALID" CodeTagInvalid = "TAG_INVALID" CodeDenied = "DENIED" CodeUnsupporteD = "UNSUPPORTED" )
Error codes for docker client responses
View Source
var ( // ErrUnsupportedManifestType ErrUnsupportedManifestType = errors.New("unsupported manifest type") )
Functions ¶
func MakeDigest ¶
MakeDigest takes in a series of bytes and returns it as a SHA256 docker digest
Types ¶
type Binder ¶
type Binder struct{}
Binder is the echo binder that allows docker manifests to be read
type ManifestV2 ¶
type ManifestV2 struct {
Size string `json:"size"`
MediaType string `json:"mediaType"`
Config struct {
Size uint64 `json:"size"`
Digest string `json:"digest"`
MediaType string `json:"mediaType"`
} `json:"config"`
Layers []struct {
Size uint64 `json:"size"`
Digest string `json:"digest"`
MediaType string `json:"mediaType"`
} `json:"layers"`
}
ManifestV2 is a docker manifest following the version2 type
func (*ManifestV2) Digest ¶
func (man *ManifestV2) Digest() string
Digest returns the digest of a docker V2 manifest
Click to show internal directories.
Click to hide internal directories.