transmission

package
v0.0.0-...-d323686 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 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, url 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.

Jump to

Keyboard shortcuts

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