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: 20 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 info of Dao.

func New

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

New new a Dao and return.

func (*Dao) AddChangePWDRecord

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

AddChangePWDRecord set user change passwd record to cache.

func (*Dao) AddCount

func (d *Dao) AddCount(c context.Context, mid int64, uuid string) (err error)

AddCount add user unnotify count daily.

func (*Dao) AddDCheckCache

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

AddDCheckCache add double check cache.

func (*Dao) AddException

func (d *Dao) AddException(c context.Context, l *model.Log) (err error)

AddException add feedback.

func (*Dao) AddExpectionMsg

func (d *Dao) AddExpectionMsg(c context.Context, l *model.Log) (err error)

AddExpectionMsg add user login expection msg.

func (*Dao) AddFeedBack

func (d *Dao) AddFeedBack(c context.Context, l *model.Log) (err error)

AddFeedBack add feedback

func (*Dao) AddLocs

func (d *Dao) AddLocs(c context.Context, mid, locid, ts int64) (err error)

AddLocs add login log.

func (*Dao) AddLocsCache

func (d *Dao) AddLocsCache(c context.Context, mid int64, locs *model.Locs) (err error)

AddLocsCache add login locs count to cache.

func (*Dao) AddUnNotify

func (d *Dao) AddUnNotify(c context.Context, mid int64, uuid string) (err error)

AddUnNotify user unnotiry uuid.

func (*Dao) ChangePWDRecord

func (d *Dao) ChangePWDRecord(c context.Context, mid int64) (b bool, err error)

ChangePWDRecord check if user had change pwd recently one month.

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) Count

func (d *Dao) Count(c context.Context, mid int64, uuid string) (count int64, err error)

Count get user close notify count.

func (*Dao) DCheckCache

func (d *Dao) DCheckCache(c context.Context, mid int64) (b bool, err error)

DCheckCache check if user had notify by double check.

func (*Dao) DelCount

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

DelCount del count for testing clear data.

func (*Dao) DelUnNotify

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

DelUnNotify del user unnotify record.

func (*Dao) DoubleCheck

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

DoubleCheck notify passport to remove login.

func (*Dao) ExceptionLoc

func (d *Dao) ExceptionLoc(c context.Context, mid int64) (eps []*model.Expection, err error)

ExceptionLoc get exception loc.

func (*Dao) ExpectionMsg

func (d *Dao) ExpectionMsg(c context.Context, mid int64) (msg *model.Log, err error)

ExpectionMsg get user expection msg.

func (*Dao) Locs

func (d *Dao) Locs(c context.Context, mid int64) (locs map[int64]int64, err error)

Locs get all login location.

func (*Dao) LocsCache

func (d *Dao) LocsCache(c context.Context, mid int64) (locs map[int64]int64, err error)

LocsCache get login locs count.

func (*Dao) UnNotify

func (d *Dao) UnNotify(c context.Context, mid int64, uuid string) (b bool, err error)

UnNotify check if not send notify to user of uuid deveice.

Jump to

Keyboard shortcuts

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