download

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCookies added in v0.1.1

func SetCookies(f string) (err error)

set cookies from netscape cookies file

func SetProxy

func SetProxy(p string) error

set http client transport proxy

Types

type Info

type Info struct {
	URL      string
	Path     string
	Header   map[string]string
	FileName string
	// contains filtered or unexported fields
}

func (*Info) Manager

func (d *Info) Manager(s *Setting) error

manage and download file

func (*Info) WithRange

func (d *Info) WithRange(s *Setting) error

download file with concurrent chunk and resume capability

func (*Info) WithoutRange

func (d *Info) WithoutRange() error

download file normally without concurrency and resume capability

type Setting

type Setting struct {
	ChunkSize int64
	Thread    int
	MaxRetry  int

	Force bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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