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: 12 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 struct answer history of Dao

func New

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

New new a Dao and return.

func (*Dao) BeFormal

func (d *Dao) BeFormal(c context.Context, mid int64, cookie, ip string) (err error)

BeFormal be formal member.

func (*Dao) Begin

func (d *Dao) Begin(c context.Context) (tx *xsql.Tx, err error)

Begin begin transaction

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) CurrentCount

func (d *Dao) CurrentCount(c context.Context, mid int64, start, end time.Time) (res int64, err error)

CurrentCount current count

func (*Dao) DelApplyFlagCache

func (d *Dao) DelApplyFlagCache(c context.Context, code string) (err error)

DelApplyFlagCache del apply Flag Cache

func (*Dao) DelBuyFlagCache

func (d *Dao) DelBuyFlagCache(c context.Context, mid int64) (err error)

DelBuyFlagCache del buy flag cache

func (*Dao) Invite

func (d *Dao) Invite(c context.Context, code string) (res *model.Invite, err error)

Invite invite info

func (*Dao) Invites

func (d *Dao) Invites(c context.Context, mid int64) (res []*model.Invite, err error)

Invites invite list

func (*Dao) Ping

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

Ping ping health.

func (*Dao) SetApplyFlagCache

func (d *Dao) SetApplyFlagCache(c context.Context, code, f string) (ok bool, err error)

SetApplyFlagCache set apply flag cache

func (*Dao) SetBuyFlagCache

func (d *Dao) SetBuyFlagCache(c context.Context, mid int64, f string) (ok bool, err error)

SetBuyFlagCache set buy flag cache

func (*Dao) TxAddInvite

func (d *Dao) TxAddInvite(c context.Context, tx *xsql.Tx, inv *model.Invite) (affected int64, err error)

TxAddInvite transaction invite

func (*Dao) UpdateInvite

func (d *Dao) UpdateInvite(c context.Context, imid int64, usedAt int64, code string) (affected int64, err error)

UpdateInvite update invite

Jump to

Keyboard shortcuts

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