service

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: Apache-2.0 Imports: 17 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDownloadPath

func GetDownloadPath() string

Types

type DJob

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

type DServ

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

func (*DServ) GetConfigPath

func (srv *DServ) GetConfigPath() string

func (*DServ) LoadSettings

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

func (*DServ) Progress

func (srv *DServ) Progress() []DJob

func (*DServ) ProgressSockJS

func (srv *DServ) ProgressSockJS(c sockjs.Session) error

func (*DServ) Register

func (srv *DServ) Register(r echo.RouteRegister, enableSockJS bool)

func (*DServ) SavePath

func (srv *DServ) SavePath() func() string

func (*DServ) SaveSettings

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

func (*DServ) SetSavePath

func (srv *DServ) SetSavePath(savePath func() string) *DServ

func (*DServ) SetTmpl

func (srv *DServ) SetTmpl(tmpl string) *DServ

func (*DServ) StartAllTask

func (srv *DServ) StartAllTask()

func (*DServ) StopAllTask

func (srv *DServ) StopAllTask()

func (*DServ) Tmpl

func (srv *DServ) Tmpl() string

type DownloadSettings

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

type NewJob

type NewJob struct {
	Url       string
	PartCount int64
	FilePath  string
	Pipes     []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