registry

package
v0.0.0-...-93529e1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Name     string
	User     string
	Password string
}

type Manifest

type Manifest struct {
	SchemaVersion int                `json:"schemaVersion"`
	Name          string             `json:"name"`
	History       []registryHistory  `json:"history"`
	FsLayers      []registryFsLayers `json:"fsLayers"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service connects to the Docker Hub over the internet

func NewMockService

func NewMockService(transport *http.Transport, aurl string, rurl string, surl string) Service

NewMockService is for testing

func NewService

func NewService() Service

NewService is a real info service

type TokenAuthClient

type TokenAuthClient struct {
	// contains filtered or unexported fields
}

TokenAuthClient is associated with a particular org / image

func NewTokenAuth

func NewTokenAuth(i Image, rs *Service) (t *TokenAuthClient, err error)

func (*TokenAuthClient) GetImageDownloadSize

func (t *TokenAuthClient) GetImageDownloadSize(m Manifest) (size int64, layerSizes []int64, err error)

GetImageDownloadSize gets the download size of the image. The total size is returned as well as an array with the size of each layer. Only layers that affect the filesystem generate a new blob. If the blob already exists for the image the layer size will be 0. The blobs are gzip compressed so the size on disk will be larger.

func (*TokenAuthClient) GetManifest

func (t *TokenAuthClient) GetManifest(tag string) (manifest Manifest, body []byte, err error)

func (*TokenAuthClient) GetTags

func (t *TokenAuthClient) GetTags() (tags []string, err error)

type V1Compatibility

type V1Compatibility struct {
	Id              string          `json:"id"`
	Throwaway       bool            `json:"throwaway"`
	Config          registryConfig  `json:"config,omitempty"`
	ContainerConfig containerConfig `json:"container_config,omitempty"`
	Created         string          `json:"created,omitempty"`
	Author          string          `json:"author,omitempty"`
}

Jump to

Keyboard shortcuts

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