tracker

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg Config) error

func Loaded

func Loaded() int

Types

type BHD

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

func NewBHD

func NewBHD(c BHDConfig) *BHD

func (*BHD) Check

func (c *BHD) Check(host string) bool

func (*BHD) IsUnregistered

func (c *BHD) IsUnregistered(torrent *Torrent) (error, bool)

func (*BHD) Name

func (c *BHD) Name() string

type BHDConfig

type BHDConfig struct {
	Key string `koanf:"api_key"`
}

type Config

type Config struct {
	BHD BHDConfig
}

type Interface

type Interface interface {
	Name() string
	Check(string) bool
	IsUnregistered(torrent *Torrent) (error, bool)
}

func Get

func Get(host string) Interface

type Torrent

type Torrent struct {
	// torrent
	Hash            string `json:"Hash"`
	Name            string `json:"Name"`
	TotalBytes      int64  `json:"TotalBytes"`
	DownloadedBytes int64  `json:"DownloadedBytes"`
	State           string `json:"State"`
	Downloaded      bool   `json:"Downloaded"`
	Seeding         bool   `json:"Seeding"`

	// tracker
	TrackerName   string
	TrackerStatus string
}

Jump to

Keyboard shortcuts

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