DownloadService

package
v0.0.0-...-f764b3d Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DJob

type DJob struct {
	Id         int
	FileName   string
	Size       int64
	Downloaded int64
	Progress   int64
	Speed      int64
}

type DServ

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

func (*DServ) LoadSettings

func (srv *DServ) LoadSettings(sf string) error

func (*DServ) Redirect

func (service *DServ) Redirect(responseWriter http.ResponseWriter, request *http.Request)

func (*DServ) SaveSettings

func (srv *DServ) SaveSettings(sf string) error

func (*DServ) Start

func (srv *DServ) Start(listenPort int) error

func (*DServ) StartAllTask

func (srv *DServ) StartAllTask()

func (*DServ) StopAllTask

func (srv *DServ) StopAllTask()

type DownloadSettings

type DownloadSettings struct {
	FI httpclient.FileInfo           `json:"FileInfo"`
	Dp []httpclient.DownloadProgress `json:"DownloadProgress"`
}

type NewJob

type NewJob struct {
	Url       string
	PartCount int64
	FilePath  string
}

type ServiceSettings

type ServiceSettings struct {
	Ds []DownloadSettings
}

func LoadFromFile

func LoadFromFile(s string) (*ServiceSettings, error)

func (*ServiceSettings) SaveToFile

func (s *ServiceSettings) SaveToFile(fp string) error

Jump to

Keyboard shortcuts

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