download

package
v0.0.0-...-ec5dca2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFetcher

type FileFetcher interface {
	// FetchFile takes a url returns to location of the donwloaded file
	FetchFile(url string) (string, error)
}

FileFetcher is an interface responsible for fetching files from a url

func InitFileFetcher

func InitFileFetcher() (FileFetcher, error)

func MakeBasicFileFetcher

func MakeBasicFileFetcher(filePath string, client *http.Client) (FileFetcher, error)

func MakeFileFetcherTempDir

func MakeFileFetcherTempDir(client *http.Client) (FileFetcher, error)

func MakeGzipFileFetcher

func MakeGzipFileFetcher(out *os.File, f FileFetcher) (FileFetcher, error)

func MakeRetryFileFetcher

func MakeRetryFileFetcher(retry uint, out *os.File, f FileFetcher) (FileFetcher, error)

func MakeTarFileFetcher

func MakeTarFileFetcher(out *os.File, f FileFetcher) (FileFetcher, error)

func MakeZipFileFetcher

func MakeZipFileFetcher(out *os.File, f FileFetcher) (FileFetcher, error)

Jump to

Keyboard shortcuts

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