25 lines
716 B
Go
25 lines
716 B
Go
package transmission
|
|
|
|
import (
|
|
"github.com/pyed/transmission"
|
|
)
|
|
|
|
// Client interface for Transmission operations
|
|
type Client interface {
|
|
GetTorrents() (transmission.Torrents, error)
|
|
GetTorrent(id int) (*transmission.Torrent, error)
|
|
GetStats() (*transmission.Stats, error)
|
|
StopAll() error
|
|
StartAll() error
|
|
VerifyAll() error
|
|
StopTorrent(id int) (string, error)
|
|
StartTorrent(id int) (string, error)
|
|
VerifyTorrent(id int) (string, error)
|
|
DeleteTorrent(id int, deleteData bool) (string, error)
|
|
ExecuteCommand(cmd transmission.Command) (*transmission.CommandResult, error)
|
|
ExecuteAddCommand(cmd transmission.AddCommand) (*transmission.Torrent, error)
|
|
SetSort(sort transmission.SortType)
|
|
Version() string
|
|
}
|
|
|