save

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 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)

func NewProxyRegistryWithAuth

func NewProxyRegistryWithAuth(ctx context.Context, username, password, rootdir, domain string) (distribution.Namespace, error)

Types

type BlobList added in v0.9.0

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

BlobList 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

func (*DefaultImageSaver) SaveImagesWithAuth

func (is *DefaultImageSaver) SaveImagesWithAuth(imageList ImageListWithAuth, dir string, platform v1.Platform) error

type Driver

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

Driver is a storage driver.StorageDriver implementation backed by a local filesystem. All provided paths will be sub paths 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 ImageListWithAuth

type ImageListWithAuth []Section

type ImageManifest added in v0.9.0

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

type ImageSave

type ImageSave interface {
	// SaveImages is not concurrently safe
	SaveImages(images []string, dir string, platform v1.Platform) error
}

ImageSave can save a list of images of the specified platform

func NewImageSaver

func NewImageSaver(ctx context.Context) ImageSave

type ManifestList added in v0.9.0

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

ManifestList 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 ParseNormalizedNamed

func ParseNormalizedNamed(s string, registry string) (Named, error)

func (Named) Domain

func (n Named) Domain() string

func (Named) FullName

func (n Named) FullName() string

func (Named) Name added in v0.9.0

func (n Named) Name() string

func (Named) Repo

func (n Named) Repo() string

func (Named) String added in v0.9.0

func (n Named) String() string

func (Named) Tag

func (n Named) Tag() string

type Section

type Section struct {
	Registry string             `json:"registry,omitempty"`
	Username string             `json:"username,omitempty"`
	Password string             `json:"password,omitempty"`
	Images   map[string][]Named `json:"images,omitempty"`
}

Directories

Path Synopsis
distributionpkg

Jump to

Keyboard shortcuts

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