shutil

package
v0.0.0-...-e537141 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkDownload

func BulkDownload(dl Downloader, down Downloads, ctx context.Context, cfg Context) error

Types

type Arg

type Arg int
const (
	ArgSrc Arg = iota
	ArgtDst
)

type Context

type Context struct {
	Log      slog.Logger
	Download DownloadContext
}

type DownloadContext

type DownloadContext struct {
	Conc conc.Main
}

type Downloader

type Downloader interface {
	Download(ctx context.Context, cfg DownloadContext, url string, dest string) error
}

type Downloads

type Downloads struct {
	Urls     []string
	OutFiles []string
}

type GotDownloader

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

func (GotDownloader) Download

func (gd GotDownloader) Download(ctx context.Context, cfg DownloadContext, url string, dest string) error

type Main

type Main struct {
	FS         fs.Main
	Shell      Shell
	Downloader Downloader
}

type Shell

type Shell struct {
	Copy       func(fs fs.FS, src, dst string) error
	Downloader Downloader
}

Directories

Path Synopsis
Packege environment implements setting up and handling environment variables.
Packege environment implements setting up and handling environment variables.
Package fs is built on top of the fs package of the go standard library.
Package fs is built on top of the fs package of the go standard library.
Package path provides simple abstractions over the os/path package of the go standard library.
Package path provides simple abstractions over the os/path package of the go standard library.

Jump to

Keyboard shortcuts

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