rtorrent

package module
v0.0.0-...-fb99d94 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2016 License: MIT Imports: 3 Imported by: 0

README

go-rtorrent

Build Status Go Report Card GoDoc codecov

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthRoundTripper

type BasicAuthRoundTripper struct {
	RoundTripper http.RoundTripper
	Credentials  *Credentials
}

func NewBasicAuthRoundTripper

func NewBasicAuthRoundTripper(roundTripper http.RoundTripper, creds *Credentials) *BasicAuthRoundTripper

func (*BasicAuthRoundTripper) RoundTrip

func (r *BasicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type Credentials

type Credentials struct {
	Username string
	Password string
}

type RTorrent

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

func New

func New(addr string) *RTorrent

func NewWithCredentials

func NewWithCredentials(addr string, credentials *Credentials) *RTorrent

func (*RTorrent) GetTorrents

func (r *RTorrent) GetTorrents(view View) ([]Torrent, error)

func (*RTorrent) IP

func (r *RTorrent) IP() (string, error)

func (*RTorrent) Name

func (r *RTorrent) Name() (string, error)

type Torrent

type Torrent struct {
	Hash      string
	Name      string
	Path      string
	Size      int64
	Label     string
	Completed bool
	Ratio     float64
}

type View

type View string
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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL