...

Package manager

Overview ▾

Variables

var (
    Version string
)

func AddDownload

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

func GetDownload

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

func GetVerboseDownloaded(id int64) []byte

func Initialize

func Initialize(logLevel int) error

func PauseDownload

func PauseDownload(id int64) error

func RemoveDownload

func RemoveDownload(id int64) error

func ResumeDownload

func ResumeDownload(id int64) error

func SetAutoSave

func SetAutoSave(seconds int64)

func SetDownloadDir

func SetDownloadDir(path string)

func SetForce

func SetForce(force bool)

func SetMaxConnections

func SetMaxConnections(maxconns int64)

func SetMaxRetries

func SetMaxRetries(maxretries int)

func SetMinSplitSize

func SetMinSplitSize(minsplitsize int64)

func SetPreallocate

func SetPreallocate(preallocate bool)

func SetResume

func SetResume(resume bool)

func SetRetryDelay

func SetRetryDelay(seconds int64)

func SetUserAgentExtra

func SetUserAgentExtra(extra string)

func Shutdown

func Shutdown() error

func WaitAll

func WaitAll()

func WaitDownload

func WaitDownload(id int64) (int, error)

type DownloadInfo

type DownloadInfo struct {
    Download *download.Download
}

type DownloadResult

type DownloadResult struct {
    Status int
    Err    error
}

type ManagedDownload

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

type Metadata

type Metadata struct {
    Name string
    Size int64
}

func FetchMetadata

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

type NewDownloadInfo

type NewDownloadInfo struct {
    URL      string
    PostData []byte
}