transmission

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID          = "transmission"
	EndpointKey = "endpoint"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Transmission

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

func NewTransmission

func NewTransmission(endpoint string) (*Transmission, error)

func (*Transmission) TorrentAddFile

func (v *Transmission) TorrentAddFile(ctx context.Context, filepath string) (transmissionrpc.Torrent, error)

TorrentAddFile adds a new torrent by uploading a .torrent file.

ctx is the context for the request. filepath is the path to the .torrent file. Returns transmissionrpc.Torrent and error.

func (*Transmission) TorrentAddUrl

func (v *Transmission) TorrentAddUrl(ctx context.Context, magnetUrl string) (transmissionrpc.Torrent, error)

TorrentAddUrl adds a torrent to the Transmission client using a magnet link.

ctx - the context for the function. url - the magnet link to add. (transmissionrpc.Torrent, error) - returns the added torrent or an error.

func (*Transmission) TorrentGetAll

func (v *Transmission) TorrentGetAll(ctx context.Context) ([]transmissionrpc.Torrent, error)

TorrentGetAll returns all the known fields for all the torrents.

func (*Transmission) TorrentRemove

func (v *Transmission) TorrentRemove(ctx context.Context, ids []int64) error

TorrentRemove allows to delete one or more torrents only.

func (*Transmission) TorrentStopIDs

func (v *Transmission) TorrentStopIDs(ctx context.Context, ids []int64) error

TorrentStopIDs stops torrent(s) which id is in the provided slice. Can be one, can be several, can be all (if slice is empty or nil).

Jump to

Keyboard shortcuts

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