interfaces

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Search(query string) []Torrent
	NavigateTo(torrent Torrent)
	FetchTorrentDescription(torrent Torrent) string
	FetchTorrentFiles(torrent Torrent) []TorrentFile
}

type Torrent

type Torrent struct {
	Client      Client
	ID          string
	Title       string
	Description string
	InfoHash    string
	Files       []TorrentFile
	MagnetLink  string
	Size        int
	Uploaded    string
	Seeders     int
	Leechers    int
}

func (Torrent) FetchDescription

func (t Torrent) FetchDescription() string

func (Torrent) FetchFiles

func (t Torrent) FetchFiles() []TorrentFile

func (Torrent) GetPrettySize

func (t Torrent) GetPrettySize() string

type TorrentFile

type TorrentFile struct {
	Name string
	Size int
}

func (TorrentFile) GetPrettySize

func (tf TorrentFile) GetPrettySize() string

Jump to

Keyboard shortcuts

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