Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDownloader ¶
type BaseDownloader struct {
// contains filtered or unexported fields
}
BaseDownloader holds all download related info
func (*BaseDownloader) GetEndTime ¶
func (bd *BaseDownloader) GetEndTime() string
func (*BaseDownloader) GetFiles ¶
func (bd *BaseDownloader) GetFiles() map[string]string
func (*BaseDownloader) GetID ¶
func (bd *BaseDownloader) GetID() string
func (*BaseDownloader) GetStartTime ¶
func (bd *BaseDownloader) GetStartTime() string
func (*BaseDownloader) GetStatus ¶
func (bd *BaseDownloader) GetStatus() string
func (*BaseDownloader) GetType ¶
func (bd *BaseDownloader) GetType() string
type Concurrent ¶
type Concurrent struct {
BaseDownloader
// contains filtered or unexported fields
}
func (*Concurrent) Download ¶
func (c *Concurrent) Download() error
type Downloader ¶
type Downloader interface {
Download() error
GetID() string
GetStartTime() string
GetEndTime() string
GetStatus() string
GetType() string
GetFiles() map[string]string
}
Downloader is the interface for all download types
func NewConcurrent ¶
func NewConcurrent(urls []string) (Downloader, error)
func NewSerial ¶
func NewSerial(urls []string) (Downloader, error)
NewSerial returns an instance of Serial downloader
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager keeps track of all downloads
func (*Manager) GetStatus ¶
func (mgr *Manager) GetStatus(id string) (*models.StatusResponse, error)
GetStatus returns status of a particular download request
func (*Manager) NewDownload ¶
func (mgr *Manager) NewDownload(request models.DownloadRequest) (Downloader, error)
NewDownload returns appropriate Downloader, based on the type of download request
Click to show internal directories.
Click to hide internal directories.