mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
23 lines
428 B
Go
23 lines
428 B
Go
package pkg
|
|
|
|
import "io/fs"
|
|
|
|
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
|
|
WalkFunc() func(fn func(path string, info fs.FileInfo) error) error
|
|
}
|
|
|
|
type Downloader interface {
|
|
GetAll() ([]Torrent, error)
|
|
Download(link, hash, dir string) (Torrent, error)
|
|
}
|