client

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Infos

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

type Model

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

Model represents the torrent client model.

func New

func New(downloadFolder string, files []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 TorrentInfos

type TorrentInfos struct {
	Infos Infos
	// contains filtered or unexported fields
}

func (*TorrentInfos) Abort

func (d *TorrentInfos) Abort()

func (*TorrentInfos) Dropped

func (d *TorrentInfos) Dropped()

func (*TorrentInfos) Finished

func (d *TorrentInfos) Finished()

func (*TorrentInfos) Idx

func (d *TorrentInfos) Idx() int

func (*TorrentInfos) IsPaused added in v0.0.3

func (d *TorrentInfos) IsPaused() bool

func (*TorrentInfos) IsRunning

func (d *TorrentInfos) IsRunning() bool

func (*TorrentInfos) PauseAndPlay

func (d *TorrentInfos) PauseAndPlay()

func (*TorrentInfos) SetETA

func (d *TorrentInfos) SetETA(eta string)

Jump to

Keyboard shortcuts

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