Documentation
¶
Index ¶
- func PromError(name string, format string, args ...interface{})
- type Dao
- func (d *Dao) Add(c context.Context, mid, fid int64) (lastID int64, err error)
- func (d *Dao) AddArc(c context.Context, pid, aid, sort int64, desc string) (lastID int64, err error)
- func (d *Dao) AddArcCache(c context.Context, pid int64, arc *model.ArcSort) (err error)
- func (d *Dao) ArcsCache(c context.Context, pid int64, start, end int) (arcs []*model.ArcSort, err error)
- func (d *Dao) BatchAddArc(c context.Context, pid int64, arcSorts []*model.ArcSort) (lastID int64, err error)
- func (d *Dao) BatchDelArc(c context.Context, pid int64, aids []int64) (affected int64, err error)
- func (d *Dao) BatchUpdateArcSort(c context.Context, pid int64, arcSorts []*model.ArcSort) (affected int64, err error)
- func (d *Dao) Del(c context.Context, pid int64) (affected int64, err error)
- func (d *Dao) DelArc(c context.Context, pid, aid int64) (affected int64, err error)
- func (d *Dao) DelArcsCache(c context.Context, pid int64, aids []int64) (err error)
- func (d *Dao) DelCache(c context.Context, pid int64) (err error)
- func (d *Dao) DelPlCache(c context.Context, mid, pid int64) (err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PlByPid(c context.Context, pid int64) (res *model.PlStat, err error)
- func (d *Dao) PlStatCache(c context.Context, mid, pid int64) (stat *model.PlStat, err error)
- func (d *Dao) PlsByMid(c context.Context, mid int64) (res []*model.PlStat, err error)
- func (d *Dao) PlsByPid(c context.Context, pids []int64) (res []*model.PlStat, err error)
- func (d *Dao) PlsCache(c context.Context, pids []int64) (res []*model.PlStat, err error)
- func (d *Dao) PubShare(c context.Context, pid, aid, share int64) (err error)
- func (d *Dao) PubView(c context.Context, pid, aid, view int64) (err error)
- func (d *Dao) RegReply(c context.Context, pid, mid int64) (err error)
- func (d *Dao) SearchVideo(c context.Context, pn, ps int, query string) (res []*model.SearchArc, count int, err error)
- func (d *Dao) SetArcDescCache(c context.Context, pid, aid int64, desc string) (err error)
- func (d *Dao) SetArcsCache(c context.Context, pid int64, arcs []*model.ArcSort) (err error)
- func (d *Dao) SetPlCache(c context.Context, plStats []*model.PlStat) (err error)
- func (d *Dao) SetPlStatCache(c context.Context, mid, pid int64, stat *model.PlStat) (err error)
- func (d *Dao) SetStatsCache(c context.Context, mid int64, plStats []*model.PlStat) (err error)
- func (d *Dao) StatsCache(c context.Context, mid int64) (res []*model.PlStat, err error)
- func (d *Dao) Update(c context.Context, pid int64) (affected int64, err error)
- func (d *Dao) UpdateArcDesc(c context.Context, pid, aid int64, desc string) (affected int64, err error)
- func (d *Dao) UpdateArcSort(c context.Context, pid, aid, sort int64) (affected int64, err error)
- func (d *Dao) Video(c context.Context, pid, aid int64) (res *model.ArcSort, err error)
- func (d *Dao) Videos(c context.Context, pid int64) (res []*model.ArcSort, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao struct.
func (*Dao) AddArc ¶
func (d *Dao) AddArc(c context.Context, pid, aid, sort int64, desc string) (lastID int64, err error)
AddArc add archive to playlist.
func (*Dao) AddArcCache ¶
AddArcCache add playlist archive cache.
func (*Dao) ArcsCache ¶
func (d *Dao) ArcsCache(c context.Context, pid int64, start, end int) (arcs []*model.ArcSort, err error)
ArcsCache get playlist archives cache.
func (*Dao) BatchAddArc ¶
func (d *Dao) BatchAddArc(c context.Context, pid int64, arcSorts []*model.ArcSort) (lastID int64, err error)
BatchAddArc add archives to playlist.
func (*Dao) BatchDelArc ¶
BatchDelArc delete archives from playlist.
func (*Dao) BatchUpdateArcSort ¶
func (d *Dao) BatchUpdateArcSort(c context.Context, pid int64, arcSorts []*model.ArcSort) (affected int64, err error)
BatchUpdateArcSort batch update playlist arc sort.
func (*Dao) DelArcsCache ¶
DelArcsCache delete playlist archives cache.
func (*Dao) DelPlCache ¶
DelPlCache delete playlist from redis.
func (*Dao) PlStatCache ¶
PlStatCache get stat from cache.
func (*Dao) SearchVideo ¶
func (d *Dao) SearchVideo(c context.Context, pn, ps int, query string) (res []*model.SearchArc, count int, err error)
SearchVideo get search video.
func (*Dao) SetArcDescCache ¶
SetArcDescCache set playlist archive desc cache.
func (*Dao) SetArcsCache ¶
SetArcsCache set playlist archives cache.
func (*Dao) SetPlCache ¶
SetPlCache set playlist to cache.
func (*Dao) SetPlStatCache ¶
SetPlStatCache set playlist stat to cache.
func (*Dao) SetStatsCache ¶
SetStatsCache set playlist stat list to cache.
func (*Dao) StatsCache ¶
StatsCache get playlist stats from cache.
func (*Dao) UpdateArcDesc ¶
func (d *Dao) UpdateArcDesc(c context.Context, pid, aid int64, desc string) (affected int64, err error)
UpdateArcDesc update playlist arc desc.
func (*Dao) UpdateArcSort ¶
UpdateArcSort update playlist arc sort.