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: 18 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 {
	ReadORM *gorm.DB
	// contains filtered or unexported fields
}

Dao dao

func New

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

New init mysql db

func (*Dao) Close

func (dao *Dao) Close()

Close close the resource.

func (*Dao) Followers

func (d *Dao) Followers(ctx context.Context, fid int64, mid int64) (model.RelationList, error)

Followers is

func (*Dao) Followings

func (d *Dao) Followings(ctx context.Context, mid int64, fid int64) (model.RelationList, error)

Followings is

func (*Dao) Ping

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

Ping dao ping

func (*Dao) RPCInfos

func (d *Dao) RPCInfos(c context.Context, mids []int64) (res map[int64]*account.Info, err error)

RPCInfos rpc info get by muti mid .

func (*Dao) RelationLogs

func (d *Dao) RelationLogs(ctx context.Context, mid, fid int64, from time.Time, to time.Time) (model.RelationLogList, error)

RelationLogs is used to retriev relation log.

func (*Dao) Stat

func (d *Dao) Stat(ctx context.Context, mid int64) (*relationPB.StatReply, error)

Stat is

func (*Dao) Stats

func (d *Dao) Stats(ctx context.Context, mids []int64) (map[int64]*relationPB.StatReply, error)

Stats is

Jump to

Keyboard shortcuts

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