client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Information

type Information struct {
	Name         string
	Progress     string
	Seeders      string
	Leechers     string
	Torrentspeed string
	ETA          string
}

type Model

type Model struct {
	Torrents []TorrentInformation // Slice to store information about each torrent being downloaded.
	// contains filtered or unexported fields
}

Model represents the torrent client model.

func New

func New(downloadDir string) (*Model, error)

New creates a new torrent client model.

func (*Model) Abort

func (m *Model) Abort()

Abort aborts all Torrents in the client model.

func (*Model) AddTorrent

func (m *Model) AddTorrent(path string) error

AddTorrent adds a new torrent info to the model.

func (*Model) Start

func (m *Model) Start() error

Start starts the download process for the client.

type TorrentInformation

type TorrentInformation struct {
	Information Information
	// contains filtered or unexported fields
}

func (*TorrentInformation) Abort

func (d *TorrentInformation) Abort()

func (*TorrentInformation) Dropped

func (d *TorrentInformation) Dropped()

Jump to

Keyboard shortcuts

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