ads

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: 10 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 is resource dao.

func New

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

New init mysql db

func (*Dao) AddBuvidCount

func (d *Dao) AddBuvidCount(c context.Context, buvidCounts map[string]map[int64]int64) (err error)

AddBuvidCount add buvid count info into redis.

func (*Dao) BuvidCount

func (d *Dao) BuvidCount(c context.Context, faid int64, buvid string) (res int64, err error)

BuvidCount get buvid count info from redis.

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) ExistsAuth

func (d *Dao) ExistsAuth(c context.Context, key string) (ok bool, err error)

ExistsAuth if existes buvid in redis.

func (*Dao) Ping

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

Ping check dao health.

func (*Dao) VideoAds

func (dao *Dao) VideoAds(c context.Context) (ads []*model.VideoAD, err error)

VideoAds get video_ads

Jump to

Keyboard shortcuts

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