downloader

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package downloader provides a library for downloading charts.

This package contains various tools for downloading charts from repository servers, and then storing them in Helm-specific directory structures. This library contains many functions that depend on a specific filesystem layout.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoOwnerRepo = errors.New("could not find a repo containing the given URL")

ErrNoOwnerRepo indicates that a given chart URL can't be found in any repos.

Functions

This section is empty.

Types

type ChartDownloader

type ChartDownloader struct {
	// Out is the location to write warning and info messages.
	Out io.Writer
	// Getter collection for the operation
	Getters getter.Providers
	// Options provide parameters to be passed along to the Getter being initialized.
	Options []getter.Option
}

ChartDownloader handles downloading a chart.

It is capable of performing verifications on charts as well.

func (*ChartDownloader) DownloadTo

func (c *ChartDownloader) DownloadTo(ref, version string) (*bytes.Reader, error)

DownloadTo retrieves a chart. Depending on the settings, it may also download a provenance file.

Returns a string path to the location where the file was downloaded or an error if something bad happened.

type VerificationStrategy

type VerificationStrategy int

VerificationStrategy describes a strategy for determining whether to verify a chart.

const (
	// VerifyNever will skip all verification of a chart.
	VerifyNever VerificationStrategy = iota
	// VerifyIfPossible will attempt a verification, it will not error if verification
	// data is missing. But it will not stop processing if verification fails.
	VerifyIfPossible
	// VerifyAlways will always attempt a verification, and will fail if the
	// verification fails.
	VerifyAlways
	// VerifyLater will fetch verification data, but not do any verification.
	// This is to accommodate the case where another step of the process will
	// perform verification.
	VerifyLater
)

Jump to

Keyboard shortcuts

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