Documentation ¶
Index ¶
- type Dao
- func (d *Dao) Add(ctx context.Context, h *model.History) error
- func (d *Dao) AddHistories(c context.Context, hs []*model.History) (err error)
- func (d *Dao) Businesses(c context.Context) (res []*model.Business, err error)
- func (d *Dao) Close()
- func (d *Dao) DelCache(c context.Context, business string, mid int64, aids []int64) (err error)
- func (d *Dao) DelLock(c context.Context) (ok bool, err error)
- func (d *Dao) DeleteHistories(c context.Context, bid int64, beginTime, endTime time.Time) (rows int64, err error)
- func (d *Dao) DeleteUserHistories(c context.Context, mid, bid int64, t time.Time) (rows int64, err error)
- func (d *Dao) EarlyHistory(c context.Context, businessID int64) (res time.Time, err error)
- func (d *Dao) Flush(c context.Context, mids string, stime int64) (err error)
- func (d *Dao) HistoriesCache(c context.Context, merges []*model.Merge) (res []*model.History, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) TrimCache(c context.Context, business string, mid int64, limit int) (err error)
- func (d *Dao) UserHistories(c context.Context, mid, businessID int64) (res []time.Time, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct { HTTPClient *bm.Client URL string BusinessesMap map[int64]*model.Business BusinessNames map[string]*model.Business // contains filtered or unexported fields }
Dao dao.
func (*Dao) AddHistories ¶
AddHistories add histories to db
func (*Dao) Businesses ¶
Businesses business
func (*Dao) DeleteHistories ¶
func (d *Dao) DeleteHistories(c context.Context, bid int64, beginTime, endTime time.Time) (rows int64, err error)
DeleteHistories delete histories
func (*Dao) DeleteUserHistories ¶
func (d *Dao) DeleteUserHistories(c context.Context, mid, bid int64, t time.Time) (rows int64, err error)
DeleteUserHistories .
func (*Dao) EarlyHistory ¶
EarlyHistory .
func (*Dao) HistoriesCache ¶
func (d *Dao) HistoriesCache(c context.Context, merges []*model.Merge) (res []*model.History, err error)
HistoriesCache return the user histories from redis.
Click to show internal directories.
Click to hide internal directories.