downloader

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DockerHubRegistry = "registry-1.docker.io"
View Source
const (
	HeaderWWWAuthenticate = "www-authenticate"
)

Variables

This section is empty.

Functions

func WriteTo

func WriteTo(reader io.Reader, dir, file string) (err error)

Types

type ImageTagList

type ImageTagList struct {
	Name string   `json:"name"`
	Tags []string `json:"tags"`
}

type Layer

type Layer struct {
	Annotations map[string]string `json:"annotations"`
	Digest      string            `json:"digest"`
}

type Manifest

type Manifest struct {
	Layers []Layer `json:"layers"`
}

type OCIDownloader

type OCIDownloader interface {
	WithBasicAuth(username string, password string)
	WithRegistry(string)
	WithRoundTripper(http.RoundTripper)
	WithInsecure(bool)
	WithTimeout(time.Duration)
	WithContext(context.Context)
	Download(image, tag, file string) (reader io.Reader, err error)
}

func NewDefaultOCIDownloader

func NewDefaultOCIDownloader() OCIDownloader

type PlatformAwareOCIDownloader

type PlatformAwareOCIDownloader interface {
	OCIDownloader
	WithOS(string)
	WithArch(string)
	GetTargetFile() string
	WithImagePrefix(string)
}

func NewStoreDownloader

func NewStoreDownloader() PlatformAwareOCIDownloader

type ProgressReader added in v0.0.18

type ProgressReader interface {
	io.Reader
	Withoutput(io.Writer)
	SetLength(int64)
	SetTitle(string)
}

func NewProgressReader added in v0.0.18

func NewProgressReader(r io.Reader) ProgressReader

type RegistryAuth

type RegistryAuth struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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