downloaders

package
Version: v0.0.0-...-686e469 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2016 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayableItem

type DisplayableItem struct {
	Fname      string
	Dlspeed    string
	Dlprogress float64
}

type DownloadEngine

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

func Initialize

func Initialize(srcs []Downloadable, threads int) (d *DownloadEngine, err error)

func (*DownloadEngine) AppendDownload

func (d *DownloadEngine) AppendDownload(dl Downloadable)

func (*DownloadEngine) Cancel

func (d *DownloadEngine) Cancel()

func (*DownloadEngine) Destruct

func (d *DownloadEngine) Destruct()

func (*DownloadEngine) Pause

func (d *DownloadEngine) Pause()

func (*DownloadEngine) Resume

func (d *DownloadEngine) Resume()

func (*DownloadEngine) TotalProgress

func (d *DownloadEngine) TotalProgress() float64

percentage

type Downloadable

type Downloadable interface {
	SetSource(string)
	AllocateFile(string, string, string)
	ActualPath() string
	Do() (curl.Response, error)
	Pause()
	Start()
	Stop()
	Progress(curl.MonitorProgressCb, time.Duration) *curl.Request
}

type DownloadableFile

type DownloadableFile struct {
	*curl.Request
	// contains filtered or unexported fields
}

func (*DownloadableFile) ActualPath

func (d *DownloadableFile) ActualPath() string

func (*DownloadableFile) AllocateFile

func (d *DownloadableFile) AllocateFile(dir, name, ext string)

func (*DownloadableFile) Pause

func (d *DownloadableFile) Pause()

func (*DownloadableFile) SetSource

func (d *DownloadableFile) SetSource(url string)

func (*DownloadableFile) Start

func (d *DownloadableFile) Start()

func (*DownloadableFile) Stop

func (d *DownloadableFile) Stop()

type DownloadableMusic

type DownloadableMusic struct {
	DownloadableFile
	Artist      string
	Title       string
	Album       string
	Genre       string
	LyricsId    float64
	AccessToken string
}

func (*DownloadableMusic) Do

func (dm *DownloadableMusic) Do() (resp curl.Response, err error)

reimplement download to insert info into id3 tags

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL