Documentation ¶
Index ¶
- Variables
- func PromError(name string, format string, args ...interface{})
- type Dao
- func (d *Dao) AddCacheKfcCode(c context.Context, id string, val int64) (err error)
- func (d *Dao) AddCacheKfcCoupon(c context.Context, id int64, val *kfc.BnjKfcCoupon) (err error)
- func (d *Dao) CacheKfcCode(c context.Context, id string) (res int64, err error)
- func (d *Dao) CacheKfcCoupon(c context.Context, id int64) (res *kfc.BnjKfcCoupon, err error)
- func (d *Dao) Close()
- func (d *Dao) DelCacheKfcCoupon(c context.Context, id int64) (err error)
- func (d *Dao) KfcCodeGiveOut(c context.Context, id int64) (res int64, err error)
- func (d *Dao) KfcCoupon(c context.Context, id int64) (res *kfc.BnjKfcCoupon, err error)
- func (d *Dao) KfcDeliver(c context.Context, id, mid int64) (res int64, err error)
- func (d *Dao) KfcWinner(c context.Context, id int64) (uid int64, err error)
- func (d *Dao) RawKfcCode(c context.Context, code string) (res *kfc.BnjKfcCoupon, err error)
- func (d *Dao) RawKfcCoupon(c context.Context, id int64) (res *kfc.BnjKfcCoupon, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KfcCodeUsed = 1 KfcCodeNotGiveOut = 0 )
KfcCodeUsed kfcDao const.
Functions ¶
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao.
func (*Dao) AddCacheKfcCode ¶
AddCacheKfcCode Set data to mc
func (*Dao) AddCacheKfcCoupon ¶
AddCacheKfcCoupon Set data to mc
func (*Dao) CacheKfcCode ¶
CacheKfcCode get data from mc
func (*Dao) CacheKfcCoupon ¶
CacheKfcCoupon get data from mc
func (*Dao) DelCacheKfcCoupon ¶
DelCacheKfcCoupon delete data from mc
func (*Dao) KfcCodeGiveOut ¶
KfcCodeGiveOut .
func (*Dao) KfcCoupon ¶
KfcCoupon get data from cache if miss will call source method, then add to cache.
func (*Dao) KfcDeliver ¶
KfcDeliver .
func (*Dao) RawKfcCode ¶
RawKfcCode .
func (*Dao) RawKfcCoupon ¶
RawKfcCoupon get coupon .
Click to show internal directories.
Click to hide internal directories.