save

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPS = "https://"
	HTTP  = "http://"
)

Variables

This section is empty.

Functions

func NewProxyRegistry

func NewProxyRegistry(ctx context.Context, rootdir, domain string) (distribution.Namespace, error)

Types

type BlobList

type BlobList struct {
	Layers    []distribution.Descriptor `json:"layers"`
	Config    distribution.Descriptor   `json:"config"`
	MediaType string                    `json:"mediaType"`
	Schema    int                       `json:"schemaVersion"`
}

this package unmarshal blobs from json into a BlobList struct then return a slice of blob digest

type DefaultImageSaver

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

func (*DefaultImageSaver) SaveImages

func (is *DefaultImageSaver) SaveImages(images []string, dir string, platform v1.Platform) error

type Driver

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

Driver is a storagedriver.StorageDriver implementation backed by a local filesystem. All provided paths will be subpaths of the RootDirectory.

func FromParameters

func FromParameters(parameters map[string]interface{}) (*Driver, error)

FromParameters constructs a new Driver with a given parameters map Optional Parameters: - rootdirectory - maxthreads

func New

func New(params DriverParameters) *Driver

New constructs a new Driver with a given rootDirectory

type DriverParameters

type DriverParameters struct {
	RootDirectory string
	MaxThreads    uint64
}

DriverParameters represents all configuration options available for the filesystem driver

type ImageMainfest

type ImageMainfest struct {
	Digest    string `json:"digest"`
	MediaType string `json:"mediaType"`
	Platform  v1.Platform
	Size      int
}

type ImageSave

type ImageSave interface {
	SaveImages(images []string, dir string, platform v1.Platform) error
}

SaveImage can save a list of images of the specified platform

func NewImageSaver

func NewImageSaver(ctx context.Context) ImageSave

type ManifestList

type ManifestList struct {
	List      []ImageMainfest `json:"manifests"`
	MediaType string          `json:"mediaType"`
	Schema    int             `json:"schemaVersion"`
}

this package unmarshal manifests from json into a ManifestList struct then choose corresponding manifest by platform

type Named

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

docker image name struct

func (Named) Domain

func (n Named) Domain() string

func (Named) FullName

func (n Named) FullName() string

func (Named) Repo

func (n Named) Repo() string

func (Named) Tag

func (n Named) Tag() string

Directories

Path Synopsis
distributionpkg

Jump to

Keyboard shortcuts

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