mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
21 lines
338 B
Go
21 lines
338 B
Go
package pkg
|
|
|
|
type Torrent interface {
|
|
Name() (string, error)
|
|
Progress() (int, error)
|
|
Stop() error
|
|
Start() error
|
|
Remove() error
|
|
//Save() string
|
|
Exists() bool
|
|
SeedRatio() (float64, error)
|
|
GetHash() string
|
|
//Reload() error
|
|
}
|
|
|
|
type Downloader interface {
|
|
GetAll() ([]Torrent, error)
|
|
Download(link, dir string) (Torrent, error)
|
|
}
|
|
|