Documentation ¶
Index ¶
- type File
- type RTorrent
- func (r *RTorrent) Add(url string) error
- func (r *RTorrent) AddTorrent(data []byte) error
- func (r *RTorrent) Delete(t Torrent) error
- func (r *RTorrent) DownTotal() (int, error)
- func (r *RTorrent) GetFiles(t Torrent) ([]File, error)
- func (r *RTorrent) GetTorrents(view View) ([]Torrent, error)
- func (r *RTorrent) IP() (string, error)
- func (r *RTorrent) Name() (string, error)
- func (r *RTorrent) SetLabel(t Torrent, newLabel string) error
- func (r *RTorrent) UpTotal() (int, error)
- func (r *RTorrent) WithHTTPClient(client *http.Client) *RTorrent
- type Torrent
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RTorrent ¶
type RTorrent struct {
// contains filtered or unexported fields
}
RTorrent is used to communicate with a remote rTorrent instance
func New ¶
New returns a new instance of `RTorrent` Pass in a true value for `insecure` to turn off certificate verification
func (*RTorrent) AddTorrent ¶ added in v0.4.0
AddTorrent adds a new torrent by the torrent files data
func (*RTorrent) DownTotal ¶
DownTotal returns the total downloaded metric reported by this RTorrent instance (bytes)
func (*RTorrent) GetTorrents ¶
GetTorrents returns all of the torrents reported by this RTorrent instance
type Torrent ¶
type Torrent struct { Hash string Name string Path string Size int Label string Completed bool Ratio float64 }
Torrent represents a torrent in rTorrent
type View ¶
type View string
View represents a "view" within RTorrent
const ( // ViewMain represents the "main" view, containing all torrents ViewMain View = "main" // ViewStarted represents the "started" view, containing only torrents that have been started ViewStarted View = "started" // ViewStopped represents the "stopped" view, containing only torrents that have been stopped ViewStopped View = "stopped" // ViewHashing represents the "hashing" view, containing only torrents that are currently hashing ViewHashing View = "hashing" // ViewSeeding represents the "seeding" view, containing only torrents that are currently seeding ViewSeeding View = "seeding" )
Click to show internal directories.
Click to hide internal directories.