transmission

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package transmission implements a library to talk to Transmission.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

A Conn represents a connection to Transmission.

func New

func New(serverURL string) (*Conn, error)

New prepares a Transmission connection by returning a *Conn.

func (*Conn) Add

func (c *Conn) Add(url string) (string, error)

Add adds a torrent by URL and returns its name.

func (*Conn) Stats

func (c *Conn) Stats() (*Statistics, error)

Stats returns current statistics (speed, number of torrents, etc.).

type Statistics

type Statistics struct {
	DownloadSpeed, UploadSpeed                           int
	TorrentCount, ActiveTorrentCount, PausedTorrentcount int
}

A Statistics holds generic stats of Transmission.

func (*Statistics) String

func (s *Statistics) String() string

Directories

Path Synopsis
Transmission client for stats and add torrent by URL.
Transmission client for stats and add torrent by URL.

Jump to

Keyboard shortcuts

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