downloader

package
v0.0.0-...-5af643a Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	Token       string
	Recursive   bool
	Concurrency int
	Verbose     bool
	ZipOutput   bool
	Preview     bool
	Update      bool
	Retries     int
	Stats       Stats
	// contains filtered or unexported fields
}

func New

func New(token string, recursive bool, concurrency int, verbose bool, zipOutput bool, preview bool, update bool, retries int) *Downloader

func (*Downloader) DownloadRepository

func (d *Downloader) DownloadRepository(owner, repo, branch, dirPath, localDir string) error

type Stats

type Stats struct {
	Files    int
	Dirs     int
	Failures int
	Bytes    int64
	sync.Mutex
}

type ZipWriter

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

func NewZipWriter

func NewZipWriter(outputPath string, baseDir string) (*ZipWriter, error)

func (*ZipWriter) AddFile

func (z *ZipWriter) AddFile(data []byte, filePath string) error

func (*ZipWriter) Close

func (z *ZipWriter) Close() error

func (*ZipWriter) CreateDirEntry

func (z *ZipWriter) CreateDirEntry(dirPath string) error

Jump to

Keyboard shortcuts

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