docker

package
v0.0.0-...-42820ff Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: GPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
	CodeUnauthorized        = "UNAUTHORIZED"
	CodeDenied              = "DENIED"
	CodeUnsupporteD         = "UNSUPPORTED"
)

Error codes for docker client responses

View Source
var (
	// ErrUnsupportedManifestType
	ErrUnsupportedManifestType = errors.New("unsupported manifest type")
)

Functions

func MakeDigest

func MakeDigest(data []byte) string

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

func (*Binder) Bind

func (b *Binder) Bind(i interface{}, c echo.Context) (err error)

type Manifest

type Manifest interface {
	Digest() string
}

Manifest is any docker manifest

func ParseManifest

func ParseManifest(manifestType string, data []byte) (Manifest, error)

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

Jump to

Keyboard shortcuts

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