registry

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ManifestMimeV2 mime type of manifests v2 format
	ManifestMimeV2 = "application/vnd.docker.distribution.manifest.v2+json"
	//ManifestMimeV1 mime type of manifests v1 format
	ManifestMimeV1 = "application/vnd.docker.distribution.manifest.v1+prettyjws"
	//AuthHeader registry authentication header
	AuthHeader = "Www-Authenticate"
	//DigestHeader registery digest header
	DigestHeader = "Docker-Content-Digest"
	//ValidAuthHeader regex to  validate auth header
	ValidAuthHeader = "^[Bb]earer *((realm|service|scope|error)=\"[A-Za-z0-9-_./:]+\",?){2,4}$"
	//Scope to delete tags
	Scope = "pull,push,delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobInfo

type BlobInfo struct {
	MediaType string
	Size      int
	Digest    string
}

BlobInfo contains the informations about a blob

type History

type History struct {
	V1Compatibility string
}

History is the raw v1 image configuration

type Image

type Image struct {
	ID           string
	Parent       string
	Created      time.Time
	Author       string
	Architecture string
	OS           string
	CheckSum     string
}

Image is the image description

type ManifestRespV1

type ManifestRespV1 struct {
	Name         string
	Tag          string
	Architecture string
	History      []History
	// contains filtered or unexported fields
}

ManifestRespV1 is a manifest v1 request response

type ManifestRespV2

type ManifestRespV2 struct {
	Config BlobInfo
	Layers []BlobInfo
	// contains filtered or unexported fields
}

ManifestRespV2 is a manifest v2 request response

type TagsListResp

type TagsListResp struct {
	Name string
	Tags []string
}

TagsListResp is the tag list request response

type TokenResp

type TokenResp struct {
	Token        string `json:"token"`
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	IssuedAt     string `json:"issued_at"`
	RefreshToken string `json:"refresh_token"`
}

TokenResp is a token request response

Jump to

Keyboard shortcuts

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