stat

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 favorite dao.

func New

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

New new a dao and return.

func (*Dao) BuvidBan

func (d *Dao) BuvidBan(c context.Context, id, mid int64, ip, buvid string) (ban bool)

BuvidBan intercepts illegal views.

func (*Dao) FolderStatMc

func (d *Dao) FolderStatMc(c context.Context, id int64) (f *favmdl.Folder, err error)

FolderStatMc return one folder stat from mc.

func (*Dao) IPBan

func (d *Dao) IPBan(c context.Context, id int64, ip string) (ban bool)

IPBan intercepts illegal views.

func (*Dao) SetFolderStatMc

func (d *Dao) SetFolderStatMc(c context.Context, id int64, s *favmdl.Folder) (err error)

SetFolderStatMc add folder stat mc cache.

func (*Dao) Stat

func (d *Dao) Stat(c context.Context, oid int64) (f *favmdl.Folder, err error)

Stat return stat count from mysql.

func (*Dao) UpdateFav

func (d *Dao) UpdateFav(c context.Context, oid, count int64) (rows int64, err error)

UpdateFav updates stat in db.

func (*Dao) UpdatePlay

func (d *Dao) UpdatePlay(c context.Context, oid, count int64) (rows int64, err error)

UpdatePlay updates stat in db.

func (*Dao) UpdateShare

func (d *Dao) UpdateShare(c context.Context, oid, count int64) (rows int64, err error)

UpdateShare updates stat in db.

Jump to

Keyboard shortcuts

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