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: 8 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) (d *Dao)

New fn

func (*Dao) AddAuthority

func (d *Dao) AddAuthority(c context.Context, mids []int64) (int64, error)

AddAuthority .

func (*Dao) AscTrendCount

func (d *Dao) AscTrendCount(c context.Context, date string, query string) (count int, err error)

AscTrendCount asc trend count

func (*Dao) Close

func (d *Dao) Close()

Close close connections of db.

func (*Dao) DescTrendCount

func (d *Dao) DescTrendCount(c context.Context, date string, query string) (count int, err error)

DescTrendCount desc trend count

func (*Dao) GetAllParameter

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

GetAllParameter get all parameter

func (*Dao) GetRatingStatis

func (d *Dao) GetRatingStatis(c context.Context, ctype int64, date, tags string) (statis []*model.RatingStatis, err error)

GetRatingStatis get rating statistics

func (*Dao) GetTrendAsc

func (d *Dao) GetTrendAsc(c context.Context, ctype string, date string, query string) (ts []*model.Trend, err error)

GetTrendAsc get asc trend

func (*Dao) GetTrendDesc

func (d *Dao) GetTrendDesc(c context.Context, ctype string, date string, query string) (ts []*model.Trend, err error)

GetTrendDesc get desc trend

func (*Dao) InsertParameter

func (d *Dao) InsertParameter(c context.Context, val string) (rows int64, err error)

InsertParameter insert vals into rating_parameter

func (*Dao) LevelList

func (d *Dao) LevelList(c context.Context, mon int, date string, mids []int64) (list []*model.RatingInfo, err error)

LevelList returns info

func (*Dao) Ping

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

Ping ping health.

func (*Dao) RmAuthority

func (d *Dao) RmAuthority(c context.Context, mids []int64) (int64, error)

RmAuthority .

func (*Dao) ScoreList

func (d *Dao) ScoreList(c context.Context, mon int, date, where string) (list []*model.RatingInfo, err error)

ScoreList return info

func (*Dao) TaskStatus

func (d *Dao) TaskStatus(c context.Context, date string) (status int, err error)

TaskStatus returns status of task on date

func (*Dao) Total

func (d *Dao) Total(c context.Context, mon int, date, where string) (total int64, err error)

Total counts scores

func (*Dao) UpScore

func (d *Dao) UpScore(c context.Context, mon int, mid int64, date string) (res *model.RatingInfo, err error)

UpScore ...

func (*Dao) UpScores

func (d *Dao) UpScores(c context.Context, mon int, mid int64) (list []*model.RatingInfo, err error)

UpScores ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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