Documentation ¶
Index ¶
- func PromError(name string)
- type Dao
- func (d *Dao) AddCacheItemCoin(c context.Context, id int64, val int64, tp int64) (err error)
- func (d *Dao) AddCacheUserCoin(c context.Context, id int64, val float64) (err error)
- func (d *Dao) AddLog(mid, ts int64, from, to float64, reason, ip, operator string, oid int64, ...)
- func (dao *Dao) AddedCoins(c context.Context, mid, upMid int64) (added int64, err error)
- func (dao *Dao) BeginTran(c context.Context) (t *sql.Tx, err error)
- func (d *Dao) CacheItemCoin(c context.Context, id int64, tp int64) (res int64, err error)
- func (d *Dao) CacheUserCoin(c context.Context, id int64) (res float64, err error)
- func (dao *Dao) CoinList(c context.Context, mid, tp, ts, size int64) (rcs []*pb.ModelList, err error)
- func (d *Dao) CoinLog(c context.Context, mid int64) (ls []*pb.ModelLog, err error)
- func (dao *Dao) CoinsAddedByMid(c context.Context, mid, aid, tp int64) (added int64, err error)
- func (d *Dao) CoinsAddedCache(c context.Context, mid, aid, tp int64) (added int64, err error)
- func (d *Dao) Exp(c context.Context, id int64) (res int64, err error)
- func (d *Dao) ExpireCoinAdded(c context.Context, mid int64) (ok bool, err error)
- func (d *Dao) IncrCoinAddedCache(c context.Context, mid, aid, tp, count int64) (err error)
- func (dao *Dao) InsertCoinArchive(c context.Context, aid, tp, mid, timestamp, multiply int64) (err error)
- func (dao *Dao) InsertCoinMember(c context.Context, aid, tp, mid, timestamp, multiply int64, upMid int64) (err error)
- func (d *Dao) ItemCoin(c context.Context, id int64, tp int64) (res int64, err error)
- func (d *Dao) PassportDetail(c context.Context, mid int64) (res *PassportDetail, err error)
- func (dao *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PubBigData(c context.Context, aid int64, msg interface{}) (err error)
- func (d *Dao) PubCoinJob(c context.Context, aid int64, msg interface{}) (err error)
- func (d *Dao) PubStat(c context.Context, aid, tp, count int64) (err error)
- func (dao *Dao) RawItemCoin(c context.Context, aid, tp int64) (count int64, err error)
- func (d *Dao) RawUserCoin(c context.Context, mid int64) (res float64, err error)
- func (d *Dao) SetCoinAddedCache(c context.Context, mid, aid, tp, count int64) (err error)
- func (d *Dao) SetCoinAddedsCache(c context.Context, mid int64, counts map[int64]int64) (err error)
- func (d *Dao) SetTodayExpCache(c context.Context, id int64, val int64) (err error)
- func (dao *Dao) TagIds(c context.Context, aid int64) (ids []int64, err error)
- func (d *Dao) TxUpdateCoins(c context.Context, tx *xsql.Tx, mid int64, coin float64) (err error)
- func (d *Dao) TxUserCoin(c context.Context, tx *xsql.Tx, mid int64) (count float64, err error)
- func (d *Dao) UpdateCoin(c context.Context, mid int64, coin float64) (err error)
- func (dao *Dao) UpdateCoinMemberCount(c context.Context, mid, upMid, count int64) (err error)
- func (dao *Dao) UpdateCoinSettleBD(c context.Context, aid, tp, expSub int64, describe string, now time.Time) (affect int64, err error)
- func (dao *Dao) UpdateItemCoinCount(c context.Context, aid, tp, count int64) (err error)
- func (dao *Dao) UpdateItemCoins(c context.Context, aid, tp, coins int64, now time.Time) (affect int64, err error)
- func (d *Dao) UserCoin(c context.Context, id int64) (res float64, err error)
- func (dao *Dao) UserCoinsAdded(c context.Context, mid int64) (addeds map[int64]int64, err error)
- type PassportDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct { Businesses map[int64]*model.Business BusinessNames map[string]*model.Business // contains filtered or unexported fields }
Dao dao config.
func (*Dao) AddCacheItemCoin ¶
AddCacheItemCoin Set data to mc
func (*Dao) AddCacheUserCoin ¶
AddCacheUserCoin set user coin count
func (*Dao) AddLog ¶
func (d *Dao) AddLog(mid, ts int64, from, to float64, reason, ip, operator string, oid int64, typ int)
AddLog .
func (*Dao) AddedCoins ¶
AddedCoins get coins added to up_mid.
func (*Dao) CacheItemCoin ¶
CacheItemCoin get data from mc
func (*Dao) CacheUserCoin ¶
CacheUserCoin get user coin count.
func (*Dao) CoinList ¶
func (dao *Dao) CoinList(c context.Context, mid, tp, ts, size int64) (rcs []*pb.ModelList, err error)
CoinList return video list of coin added in one month
func (*Dao) CoinsAddedByMid ¶
CoinsAddedByMid get coin added by mid of aid&tp.
func (*Dao) CoinsAddedCache ¶
CoinsAddedCache get coin added of archive.
func (*Dao) ExpireCoinAdded ¶
ExpireCoinAdded set expire time for coinadded
func (*Dao) IncrCoinAddedCache ¶
IncrCoinAddedCache Incr coin added
func (*Dao) InsertCoinArchive ¶
func (dao *Dao) InsertCoinArchive(c context.Context, aid, tp, mid, timestamp, multiply int64) (err error)
InsertCoinArchive .
func (*Dao) InsertCoinMember ¶
func (dao *Dao) InsertCoinMember(c context.Context, aid, tp, mid, timestamp, multiply int64, upMid int64) (err error)
InsertCoinMember .
func (*Dao) ItemCoin ¶
ItemCoin get data from cache if miss will call source method, then add to cache.
func (*Dao) PassportDetail ¶
PassportDetail get detail.
func (*Dao) PubBigData ¶
PubBigData pub msg into databus.
func (*Dao) PubCoinJob ¶
PubCoinJob pub job msg into databus.
func (*Dao) RawItemCoin ¶
RawItemCoin get count by aid.
func (*Dao) RawUserCoin ¶
RawUserCoin get user coins.
func (*Dao) SetCoinAddedCache ¶
SetCoinAddedCache set coin added of archive
func (*Dao) SetCoinAddedsCache ¶
SetCoinAddedsCache multiset added cache
func (*Dao) SetTodayExpCache ¶
SetTodayExpCache Set data to mc
func (*Dao) TxUpdateCoins ¶
TxUpdateCoins update coins
func (*Dao) TxUserCoin ¶
TxUserCoin tx user coin
func (*Dao) UpdateCoin ¶
UpdateCoin update user coins.
func (*Dao) UpdateCoinMemberCount ¶
UpdateCoinMemberCount for archive
func (*Dao) UpdateCoinSettleBD ¶
func (dao *Dao) UpdateCoinSettleBD(c context.Context, aid, tp, expSub int64, describe string, now time.Time) (affect int64, err error)
UpdateCoinSettleBD update table coin_settle_%d.
func (*Dao) UpdateItemCoinCount ¶
UpdateItemCoinCount update coin_count.
func (*Dao) UpdateItemCoins ¶
func (dao *Dao) UpdateItemCoins(c context.Context, aid, tp, coins int64, now time.Time) (affect int64, err error)
UpdateItemCoins update table coin_archive
type PassportDetail ¶
type PassportDetail struct { BindEmail bool `json:"bind_email"` BindTel bool `json:"bind_tel"` Mid int64 `json:"mid"` }
PassportDetail .