downloader

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkipDownload = errors.New("skip download")

Functions

func Download

func Download(ctx context.Context, src, dst, pwd string, opts Options) (string, error)

Download downloads the configured source to the destination.

func DownloadToTempDir

func DownloadToTempDir(ctx context.Context, src string, opts Options) (string, error)

DownloadToTempDir downloads the configured source to a temp dir.

func NewGitHubTransport added in v0.54.0

func NewGitHubTransport(u *url.URL, insecure bool, token string) http.RoundTripper

Types

type Auth added in v0.54.0

type Auth struct {
	Username string
	Password string
	Token    string
}

type CustomTransport added in v0.54.0

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

func NewCustomTransport added in v0.54.0

func NewCustomTransport(opts Options) *CustomTransport

func (*CustomTransport) RoundTrip added in v0.54.0

func (t *CustomTransport) RoundTrip(req *http.Request) (*http.Response, error)

type GitHubContentTransport added in v0.54.0

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

GitHubContentTransport is a round tripper for downloading the GitHub content.

func (*GitHubContentTransport) RoundTrip added in v0.54.0

func (t *GitHubContentTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip calls the GitHub API to download the content.

type Options added in v0.54.0

type Options struct {
	Insecure   bool
	Auth       Auth
	ETag       string
	ClientMode getter.ClientMode
}

Jump to

Keyboard shortcuts

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