mgdb

package
v0.0.0-...-a9c4fc7 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

func TorrentAdd

func TorrentAdd(data BitTorrent) (result *qmgo.InsertOneResult, err error)

func TorrentOriginAdd

func TorrentOriginAdd(data BitTorrent) (result *qmgo.InsertOneResult, err error)

Types

type A

type A = bson.A

A is an alias of bson.A

type BitTorrent

type BitTorrent struct {
	InfoHash   string    `bson:"infohash"`
	Name       string    `bson:"name"`
	Files      []File    `bson:"files,omitempty"`
	Length     int       `bson:"length,omitempty"`
	Updatetime time.Time `bson:"updatetime" json:"updatetime"`
	Createtime time.Time `bson:"createtime" json:"createtime"`
}

type BitTorrentBid

type BitTorrentBid struct {
	MgID       string    `bson:"_id"`
	InfoHash   string    `bson:"infohash"`
	Name       string    `bson:"name"`
	Files      []File    `bson:"files,omitempty"`
	Length     int       `bson:"length,omitempty"`
	Updatetime time.Time `bson:"updatetime" json:"updatetime"`
	Createtime time.Time `bson:"createtime" json:"createtime"`
}

func TorrentOriginFindSoso

func TorrentOriginFindSoso(id, sort, op, keyword string, limit ...int64) (result []BitTorrentBid, err error)

type D

type D = bson.D

D is an alias of bson.D

type E

type E = bson.E

E is an alias of bson.E

type File

type File struct {
	Path   []interface{} `bson:"path";json:"path"`
	Length int           `bson:"length"`
}

type M

type M = bson.M

M is an alias of bson.M

Jump to

Keyboard shortcuts

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