manager

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string
)

Functions

func AddDownload

func AddDownload(info *NewDownloadInfo) (int64, error)

func GetDownload added in v0.1.4

func GetDownload(id int64) *download.Download

func GetDownloaded

func GetDownloaded(id int64) int64

func GetGoPhastVersion

func GetGoPhastVersion() string

func GetName

func GetName(id int64) string

func GetSize

func GetSize(id int64) int64

func GetVerboseDownloaded added in v0.1.6

func GetVerboseDownloaded(id int64) []byte

func Initialize

func Initialize(logLevel int) error

func PauseDownload added in v0.1.4

func PauseDownload(id int64) error

func RemoveDownload

func RemoveDownload(id int64) error

func ResumeDownload added in v0.1.4

func ResumeDownload(id int64) error

func SetAutoSave added in v0.1.4

func SetAutoSave(seconds int64)

func SetDownloadDir

func SetDownloadDir(path string)

func SetForce added in v0.1.4

func SetForce(force bool)

func SetMaxConnections

func SetMaxConnections(maxconns int64)

func SetMaxRetries added in v0.1.4

func SetMaxRetries(maxretries int)

func SetMinSplitSize

func SetMinSplitSize(minsplitsize int64)

func SetPreallocate added in v0.1.4

func SetPreallocate(preallocate bool)

func SetResume added in v0.1.4

func SetResume(resume bool)

func SetRetryDelay added in v0.1.4

func SetRetryDelay(seconds int64)

func SetUserAgentExtra

func SetUserAgentExtra(extra string)

func Shutdown added in v0.1.4

func Shutdown() error

func WaitAll added in v0.1.4

func WaitAll()

func WaitDownload

func WaitDownload(id int64) (int, error)

Types

type DownloadInfo

type DownloadInfo struct {
	Download *download.Download
}

type DownloadResult added in v0.1.3

type DownloadResult struct {
	Status int
	Err    error
}

type ManagedDownload added in v0.1.3

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

type Metadata added in v0.1.5

type Metadata struct {
	Name string
	Size int64
}

func FetchMetadata added in v0.1.5

func FetchMetadata(info *NewDownloadInfo) (*Metadata, error)

type NewDownloadInfo

type NewDownloadInfo struct {
	URL      string
	PostData []byte
}

Jump to

Keyboard shortcuts

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