dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

Dao dao

func New

func New(c *conf.Config) (dao *Dao)

New init mysql db

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) FetchBuvidView

func (d *Dao) FetchBuvidView(c context.Context) (result []string, err error)

FetchBuvidView .

func (*Dao) FetchMidView

func (d *Dao) FetchMidView(c context.Context) (result []string, err error)

FetchMidView .

func (*Dao) FetchNewincomeVideo

func (d *Dao) FetchNewincomeVideo() (res []int64, err error)

FetchNewincomeVideo .

func (*Dao) FetchVideoInfo

func (d *Dao) FetchVideoInfo(c context.Context, offset, size int) (result []*model.Video, err error)

FetchVideoInfo .

func (*Dao) FetchVideoQuality

func (d *Dao) FetchVideoQuality(c context.Context, svid uint64) (result *quality.VideoQuality, err error)

FetchVideoQuality .

func (*Dao) FetchVideoTag

func (d *Dao) FetchVideoTag(c context.Context, tid int32) (result *proto.Tag, err error)

FetchVideoTag .

func (*Dao) FetchVideoTagAll

func (d *Dao) FetchVideoTagAll(c context.Context) (result []*proto.Tag, err error)

FetchVideoTagAll .

func (*Dao) FetchVideoTextTag

func (d *Dao) FetchVideoTextTag(c context.Context, svid int64) (result []string, err error)

FetchVideoTextTag .

func (*Dao) InsertBloomFilter

func (d *Dao) InsertBloomFilter(c context.Context, key string, svidList []uint64) error

InsertBloomFilter 构建BF,插入redis

func (*Dao) Ping

func (d *Dao) Ping(ctx context.Context) error

Ping dao ping

func (*Dao) SetBloomFilter

func (d *Dao) SetBloomFilter(c context.Context, key string, b *[]byte) error

SetBloomFilter .

func (*Dao) SetInvertedIndex

func (d *Dao) SetInvertedIndex(c context.Context, key string, svids []int64) error

SetInvertedIndex 倒排写入redis

Jump to

Keyboard shortcuts

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