Documentation ¶
Index ¶
- type BitTorrent
- type FileServer
- type MTorrent
- func (m *MTorrent) AddTorrentHot(id string) (err error)
- func (m *MTorrent) FindTorrent(id string) (data *TorrentInfo, err error)
- func (m *MTorrent) FindTorrentByHash(infoHash string) (data *TorrentInfo, err error)
- func (m *MTorrent) GetStatus() (result int64, err error)
- func (m *MTorrent) InsertTorrent(data BitTorrent) (err error)
- type TorrentInfo
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 (*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) 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"` }
Click to show internal directories.
Click to hide internal directories.