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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromError

func PromError(name string, format string, args ...interface{})

PromError stat and log.

func PromInfo

func PromInfo(name string)

PromInfo prometheus info count.

Types

type Dao

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

Dao .

func New

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

New creates a dao instance.

func (*Dao) Intercept

func (d *Dao) Intercept(c context.Context, pid, aid int64, ip string) (ban bool)

Intercept intercepts illegal views.

func (*Dao) Ping

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

Ping reports the health of the db/cache etc.

func (*Dao) Stat

func (d *Dao) Stat(c context.Context, pid int64) (stat *plmdl.PlStat, err error)

Stat returns stat info.

func (*Dao) Update

func (d *Dao) Update(c context.Context, stat *model.StatM, tp string) (rows int64, err error)

Update updates stat in db.

Jump to

Keyboard shortcuts

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