Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AccountCards(ctx context.Context, mids []int64) (cards map[int64]*accmdl.Card, err error)
- func (d *Dao) AddCacheElecPrepAVRank(c context.Context, avID, ver int64, val *model.RankElecPrepAVProto) (ok bool, err error)
- func (d *Dao) AddCacheElecPrepUPRank(c context.Context, upMID, ver int64, val *model.RankElecPrepUPProto) (ok bool, err error)
- func (d *Dao) BeginTran(c context.Context) (tx *xsql.Tx, err error)
- func (d *Dao) CASCacheElecPrepRank(c context.Context, val interface{}, rawItem *memcache.Item) (ok bool, err error)
- func (d *Dao) CacheElecAVRank(c context.Context, avID, ver int64) (res *model.RankElecAVProto, err error)
- func (d *Dao) CacheElecPrepAVRank(c context.Context, avID, ver int64) (res *model.RankElecPrepAVProto, item *memcache.Item, err error)
- func (d *Dao) CacheElecPrepUPRank(c context.Context, upMID, ver int64) (res *model.RankElecPrepUPProto, item *memcache.Item, err error)
- func (d *Dao) CacheElecUPRank(c context.Context, upMID int64, ver int64) (res *model.RankElecUPProto, err error)
- func (d *Dao) Close()
- func (d *Dao) DelCacheElecAVRank(c context.Context, avID, ver int64) (err error)
- func (d *Dao) DelCacheElecPrepAVRank(c context.Context, avID, ver int64) (err error)
- func (d *Dao) DelCacheElecPrepUPRank(c context.Context, upMID, ver int64) (err error)
- func (d *Dao) DelCacheElecUPRank(c context.Context, upMID, ver int64) (err error)
- func (d *Dao) LCLoadElecAVRank(avID, ver int64) (rank *model.RankElecAVProto, err error)
- func (d *Dao) LCLoadElecUPRank(upMID, ver int64) (rank *model.RankElecUPProto, err error)
- func (d *Dao) LCStoreElecAVRank(avID, ver int64, rank *model.RankElecAVProto) (err error)
- func (d *Dao) LCStoreElecUPRank(upMID, ver int64, rank *model.RankElecUPProto) (err error)
- func (d *Dao) Ping(ctx context.Context) error
- func (d *Dao) RawCountElecAVRank(ctx context.Context, avID int64, ver int64) (count int64, err error)
- func (d *Dao) RawCountElecUPRank(ctx context.Context, upMID int64, ver int64) (count int64, err error)
- func (d *Dao) RawCountUPTotalElec(ctx context.Context, upMID int64) (count int64, err error)
- func (d *Dao) RawElecAVMessages(ctx context.Context, payMIDs []int64, avID int64) (dataMap map[int64]*model.DBElecMessage, err error)
- func (d *Dao) RawElecAVMessagesByVer(ctx context.Context, payMIDs []int64, avID int64, ver int64) (dataMap map[int64]*model.DBElecMessage, err error)
- func (d *Dao) RawElecAVRank(ctx context.Context, avID int64, ver int64, payMID int64) (data *model.DBElecAVRank, err error)
- func (d *Dao) RawElecAVRankList(ctx context.Context, avID int64, ver int64, limit int) (list []*model.DBElecAVRank, err error)
- func (d *Dao) RawElecAVUserRank(ctx context.Context, avID int64, ver int64, payAmount int64, mtime time.Time) (rank int, err error)
- func (d *Dao) RawElecUPMessages(ctx context.Context, payMIDs []int64, upMID int64, ver int64) (dataMap map[int64]*model.DBElecMessage, err error)
- func (d *Dao) RawElecUPRank(ctx context.Context, upMID int64, ver int64, payMID int64) (data *model.DBElecUPRank, err error)
- func (d *Dao) RawElecUPRankList(ctx context.Context, upMID int64, ver int64, limit int) (list []*model.DBElecUPRank, err error)
- func (d *Dao) RawElecUPUserRank(ctx context.Context, upMID int64, ver int64, payAmount int64, mtime time.Time) (rank int, err error)
- func (d *Dao) RawElecUserSettings(ctx context.Context, id int, limit int) (res map[int64]model.ElecUserSetting, maxID int, err error)
- func (d *Dao) SetCacheElecAVRank(c context.Context, avID, ver int64, val *model.RankElecAVProto) (err error)
- func (d *Dao) SetCacheElecPrepAVRank(c context.Context, avID, ver int64, val *model.RankElecPrepAVProto) (err error)
- func (d *Dao) SetCacheElecPrepUPRank(c context.Context, upMID, ver int64, val *model.RankElecPrepUPProto) (err error)
- func (d *Dao) SetCacheElecUPRank(c context.Context, upMID, ver int64, val *model.RankElecUPProto) (err error)
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 dao
func (*Dao) AccountCards ¶
func (d *Dao) AccountCards(ctx context.Context, mids []int64) (cards map[int64]*accmdl.Card, err error)
AccountCards get cards by mids
func (*Dao) AddCacheElecPrepAVRank ¶
func (d *Dao) AddCacheElecPrepAVRank(c context.Context, avID, ver int64, val *model.RankElecPrepAVProto) (ok bool, err error)
AddCacheElecPrepAVRank Set data to mc
func (*Dao) AddCacheElecPrepUPRank ¶
func (d *Dao) AddCacheElecPrepUPRank(c context.Context, upMID, ver int64, val *model.RankElecPrepUPProto) (ok bool, err error)
AddCacheElecPrepUPRank Set data to mc
func (*Dao) CASCacheElecPrepRank ¶
func (d *Dao) CASCacheElecPrepRank(c context.Context, val interface{}, rawItem *memcache.Item) (ok bool, err error)
CASCacheElecPrepRank cas的方式存储预备榜单,防止分布式脏写
func (*Dao) CacheElecAVRank ¶
func (d *Dao) CacheElecAVRank(c context.Context, avID, ver int64) (res *model.RankElecAVProto, err error)
CacheElecAVRank get data from mc
func (*Dao) CacheElecPrepAVRank ¶
func (d *Dao) CacheElecPrepAVRank(c context.Context, avID, ver int64) (res *model.RankElecPrepAVProto, item *memcache.Item, err error)
CacheElecPrepAVRank get data from mc
func (*Dao) CacheElecPrepUPRank ¶
func (d *Dao) CacheElecPrepUPRank(c context.Context, upMID, ver int64) (res *model.RankElecPrepUPProto, item *memcache.Item, err error)
CacheElecPrepUPRank get data from mc
func (*Dao) CacheElecUPRank ¶
func (d *Dao) CacheElecUPRank(c context.Context, upMID int64, ver int64) (res *model.RankElecUPProto, err error)
CacheElecUPRank get data from mc
func (*Dao) DelCacheElecAVRank ¶
DelCacheElecAVRank delete data from mc
func (*Dao) DelCacheElecPrepAVRank ¶
DelCacheElecPrepAVRank delete data from mc
func (*Dao) DelCacheElecPrepUPRank ¶
DelCacheElecPrepUPRank delete data from mc
func (*Dao) DelCacheElecUPRank ¶
DelCacheElecUPRank delete data from mc
func (*Dao) LCLoadElecAVRank ¶
func (d *Dao) LCLoadElecAVRank(avID, ver int64) (rank *model.RankElecAVProto, err error)
LCLoadElecAVRank .
func (*Dao) LCLoadElecUPRank ¶
func (d *Dao) LCLoadElecUPRank(upMID, ver int64) (rank *model.RankElecUPProto, err error)
LCLoadElecUPRank .
func (*Dao) LCStoreElecAVRank ¶
func (d *Dao) LCStoreElecAVRank(avID, ver int64, rank *model.RankElecAVProto) (err error)
LCStoreElecAVRank .
func (*Dao) LCStoreElecUPRank ¶
func (d *Dao) LCStoreElecUPRank(upMID, ver int64, rank *model.RankElecUPProto) (err error)
LCStoreElecUPRank .
func (*Dao) RawCountElecAVRank ¶
func (d *Dao) RawCountElecAVRank(ctx context.Context, avID int64, ver int64) (count int64, err error)
RawCountElecAVRank .
func (*Dao) RawCountElecUPRank ¶
func (d *Dao) RawCountElecUPRank(ctx context.Context, upMID int64, ver int64) (count int64, err error)
RawCountElecUPRank .
func (*Dao) RawCountUPTotalElec ¶
RawCountUPTotalElec stupid bug from prod.
func (*Dao) RawElecAVMessages ¶
func (d *Dao) RawElecAVMessages(ctx context.Context, payMIDs []int64, avID int64) (dataMap map[int64]*model.DBElecMessage, err error)
RawElecAVMessages .
func (*Dao) RawElecAVMessagesByVer ¶
func (d *Dao) RawElecAVMessagesByVer(ctx context.Context, payMIDs []int64, avID int64, ver int64) (dataMap map[int64]*model.DBElecMessage, err error)
RawElecAVMessagesByVer .
func (*Dao) RawElecAVRank ¶
func (d *Dao) RawElecAVRank(ctx context.Context, avID int64, ver int64, payMID int64) (data *model.DBElecAVRank, err error)
RawElecAVRank .
func (*Dao) RawElecAVRankList ¶
func (d *Dao) RawElecAVRankList(ctx context.Context, avID int64, ver int64, limit int) (list []*model.DBElecAVRank, err error)
RawElecAVRankList .
func (*Dao) RawElecAVUserRank ¶
func (d *Dao) RawElecAVUserRank(ctx context.Context, avID int64, ver int64, payAmount int64, mtime time.Time) (rank int, err error)
RawElecAVUserRank .
func (*Dao) RawElecUPMessages ¶
func (d *Dao) RawElecUPMessages(ctx context.Context, payMIDs []int64, upMID int64, ver int64) (dataMap map[int64]*model.DBElecMessage, err error)
RawElecUPMessages .
func (*Dao) RawElecUPRank ¶
func (d *Dao) RawElecUPRank(ctx context.Context, upMID int64, ver int64, payMID int64) (data *model.DBElecUPRank, err error)
RawElecUPRank get elec up rank
func (*Dao) RawElecUPRankList ¶
func (d *Dao) RawElecUPRankList(ctx context.Context, upMID int64, ver int64, limit int) (list []*model.DBElecUPRank, err error)
RawElecUPRankList get elec up rank
func (*Dao) RawElecUPUserRank ¶
func (d *Dao) RawElecUPUserRank(ctx context.Context, upMID int64, ver int64, payAmount int64, mtime time.Time) (rank int, err error)
RawElecUPUserRank .
func (*Dao) RawElecUserSettings ¶
func (d *Dao) RawElecUserSettings(ctx context.Context, id int, limit int) (res map[int64]model.ElecUserSetting, maxID int, err error)
RawElecUserSettings .
func (*Dao) SetCacheElecAVRank ¶
func (d *Dao) SetCacheElecAVRank(c context.Context, avID, ver int64, val *model.RankElecAVProto) (err error)
SetCacheElecAVRank Set data to mc
func (*Dao) SetCacheElecPrepAVRank ¶
func (d *Dao) SetCacheElecPrepAVRank(c context.Context, avID, ver int64, val *model.RankElecPrepAVProto) (err error)
SetCacheElecPrepAVRank Set data to mc
func (*Dao) SetCacheElecPrepUPRank ¶
func (d *Dao) SetCacheElecPrepUPRank(c context.Context, upMID, ver int64, val *model.RankElecPrepUPProto) (err error)
SetCacheElecPrepUPRank Set data to mc
func (*Dao) SetCacheElecUPRank ¶
func (d *Dao) SetCacheElecUPRank(c context.Context, upMID, ver int64, val *model.RankElecUPProto) (err error)
SetCacheElecUPRank Set data to mc