downloader

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	WithKind(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