share

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: 9 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.

Types

type Dao

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

Dao dao struct.

func New

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

New new dao.

func (*Dao) Ping

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

Ping ping dao

func (*Dao) SetSharesCache

func (d *Dao) SetSharesCache(c context.Context, expire int, mid int64, shares map[string]int64) (err error)

SetSharesCache back cache from db.

func (*Dao) Shares

func (d *Dao) Shares(c context.Context, mid int64) (res []*shamdl.Share, err error)

Shares get shares.

func (*Dao) SharesCache

func (d *Dao) SharesCache(c context.Context, mid int64) (res map[string]int64, err error)

SharesCache get shares from cache.

Jump to

Keyboard shortcuts

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