mgdb

package
v0.0.0-...-7227ca9 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentAdd

func ContentAdd(data Content) (result *qmgo.InsertOneResult, err error)

func ContentOriginAdd

func ContentOriginAdd(data Content) (result *qmgo.InsertOneResult, err error)

func Init

func Init() error

Types

type A

type A = bson.A

A is an alias of bson.A

type Content

type Content struct {
	Url        string    `bson:"url"`
	Source     string    `bson:"source"`
	User       string    `bson:"user"`
	Id         string    `bson:"id"`
	Title      string    `bson:"title"`
	Html       string    `bson:"html"`
	Length     int       `bson:"length"`
	Updatetime time.Time `bson:"updatetime" json:"updatetime"`
	Createtime time.Time `bson:"createtime" json:"createtime"`
}

type ContentBid

type ContentBid struct {
	Url        string    `bson:"url"`
	Source     string    `bson:"source"`
	User       string    `bson:"user"`
	Id         string    `bson:"id"`
	Title      string    `bson:"title"`
	Html       string    `bson:"html"`
	Length     int       `bson:"length"`
	Updatetime time.Time `bson:"updatetime" json:"updatetime"`
	Createtime time.Time `bson:"createtime" json:"createtime"`

	MgID string `bson:"_id"`
}

func ContentFindSourceLimit

func ContentFindSourceLimit(source string, limit ...int64) (result ContentBid, err error)

func ContentNewsest

func ContentNewsest() ([]ContentBid, error)

func ContentOneByOne

func ContentOneByOne(source string) (result ContentBid, err error)

func ContentOriginFind

func ContentOriginFind(limit ...int64) (result []ContentBid, err error)

func ContentOriginFindId

func ContentOriginFindId(id, sort string, limit ...int64) (result []ContentBid, err error)

func ContentOriginFindIdGt

func ContentOriginFindIdGt(id, sort string, limit ...int64) (result []ContentBid, err error)

func ContentOriginFindNewsestOne

func ContentOriginFindNewsestOne(source string) (result ContentBid, err error)

func ContentOriginFindOne

func ContentOriginFindOne(source, id string) (result ContentBid, err error)

func ContentOriginFindSoso

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

func ContentRand

func ContentRand() (result ContentBid, err error)

func ContentRandNum

func ContentRandNum(num int64) ([]ContentBid, error)

func ContentRandSource

func ContentRandSource(source string) (result ContentBid, 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 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