torrent

package
v0.0.0-...-e0770a4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitTorrent

type BitTorrent struct {
	ID         primitive.ObjectID `bson:"_id"`
	InfoHash   string             `bson:"infohash"`
	Name       string             `bson:"name"`
	Extension  string             `bson:"extension"`
	Files      []FileServer       `bson:"files"`
	Length     int64              `bson:"length"`
	CreateTime int64              `bson:"create_time"`
	LastTime   int64              `bson:"last_time"`
	Hot        int                `bson:"hot"`
	FileType   string             `bson:"category"`
	KeyWord    []string           `bson:"key_word"`
}

type FileServer

type FileServer struct {
	Path   []interface{} `bson:"path"`
	Length int64         `bson:"length"`
}

type MTorrent

type MTorrent struct {
}

func (*MTorrent) AddTorrentHot

func (m *MTorrent) AddTorrentHot(id string) (err error)

func (*MTorrent) FindTorrent

func (m *MTorrent) FindTorrent(id string) (data *TorrentInfo, err error)

func (*MTorrent) FindTorrentByHash

func (m *MTorrent) FindTorrentByHash(infoHash string) (data *TorrentInfo, err error)

func (*MTorrent) GetStatus

func (m *MTorrent) GetStatus() (result int64, err error)

func (*MTorrent) InsertTorrent

func (m *MTorrent) InsertTorrent(data BitTorrent) (err error)

type TorrentInfo

type TorrentInfo struct {
	ID        primitive.ObjectID `json:"_id"`
	InfoHash  string             `json:"infohash"`
	Category  string             `json:"category"`
	Name      string             `json:"name"`
	Extension string             `json:"extension"`
	Files     []struct {
		Length int64    `json:"length"`
		Path   []string `json:"path"`
	} `json:"files"`
	Length     int64    `json:"length"`
	Hot        int64    `json:"hot"`
	CreateTime int64    `json:"create_time"`
	LastTime   int64    `json:"last_time"`
	KeyWord    []string `json:"key_word"`
}

Jump to

Keyboard shortcuts

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