Documentation
¶
Index ¶
- type Service
- func (s *Service) AVHistories(c context.Context, mid int64) (hs []*model.History, err error)
- func (s *Service) AddHistories(c context.Context, mid int64, typ int8, ip string, hs []*model.History) (err error)
- func (s *Service) AddHistory(c context.Context, mid, rtime int64, h *model.History) (err error)
- func (s *Service) AddMultiToView(c context.Context, mid int64, aids []int64, ip string) (err error)
- func (s *Service) AddToView(c context.Context, mid, aid int64, ip string) (err error)
- func (s *Service) ClearHistory(c context.Context, mid int64, tps []int8) (err error)
- func (s *Service) ClearToView(c context.Context, mid int64) (err error)
- func (s *Service) Close()
- func (s *Service) DelHistory(ctx context.Context, mid int64, aids []int64, typ int8) (err error)
- func (s *Service) DelToView(c context.Context, mid int64, aids []int64, viewed bool, ip string) (err error)
- func (s *Service) Delete(ctx context.Context, mid int64, his []*model.History) (err error)
- func (s *Service) FlushHistory(c context.Context, mids []int64, stime int64) (err error)
- func (s *Service) Histories(c context.Context, mid int64, typ int8, pn, ps int) (res []*model.Resource, err error)
- func (s *Service) HistoryCursor(c context.Context, mid, max, viewAt int64, ps int, tp int8, tps []int8, ...) (res []*model.Resource, err error)
- func (s *Service) HistoryType(c context.Context, mid int64, typ int8, oids []int64, ip string) (his []*model.History, err error)
- func (s *Service) ManagerHistory(c context.Context, onlyAV bool, mid int64) (his []*model.History, err error)
- func (s *Service) ManagerToView(c context.Context, mid int64, ip string) ([]*model.ToView, error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) Position(c context.Context, mid int64, aid int64, typ int8) (res *model.History, err error)
- func (s *Service) Progress(c context.Context, mid int64, aids []int64) (res map[int64]*model.History, err error)
- func (s *Service) RemainingToView(c context.Context, mid int64, ip string) (remaining int, err error)
- func (s *Service) SetShadow(c context.Context, mid, value int64) (err error)
- func (s *Service) Shadow(c context.Context, mid int64) (value int64, err error)
- func (s *Service) ToView(c context.Context, mid int64, pn, ps int, ip string) (res []*model.ArcToView, count int, err error)
- func (s *Service) Videos(c context.Context, mid int64, pn, ps int, typ int8) (res []*model.Video, err error)
- func (s *Service) WebToView(c context.Context, mid int64, pn, ps int, ip string) (res []*model.WebArcToView, count int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is history service.
func (*Service) AVHistories ¶
AVHistories return the user all av history. +wd:ignore
func (*Service) AddHistories ¶
func (s *Service) AddHistories(c context.Context, mid int64, typ int8, ip string, hs []*model.History) (err error)
AddHistories batch update history. +wd:ignore
func (*Service) AddHistory ¶
AddHistory add hisotry progress into hbase.
func (*Service) AddMultiToView ¶
AddMultiToView add toview items to user. +wd:ignore
func (*Service) ClearHistory ¶
ClearHistory clear user's historys.
func (*Service) ClearToView ¶
ClearToView clear the user toview items. +wd:ignore
func (*Service) DelHistory ¶
DelHistory delete user's history del archive . +wd:ignore
func (*Service) DelToView ¶
func (s *Service) DelToView(c context.Context, mid int64, aids []int64, viewed bool, ip string) (err error)
DelToView delete the user to videos. +wd:ignore
func (*Service) FlushHistory ¶
FlushHistory flush to hbase from cache.
func (*Service) Histories ¶
func (s *Service) Histories(c context.Context, mid int64, typ int8, pn, ps int) (res []*model.Resource, err error)
Histories return the user all av history.
func (*Service) HistoryCursor ¶
func (s *Service) HistoryCursor(c context.Context, mid, max, viewAt int64, ps int, tp int8, tps []int8, ip string) (res []*model.Resource, err error)
HistoryCursor return the user all av history.
func (*Service) HistoryType ¶
func (s *Service) HistoryType(c context.Context, mid int64, typ int8, oids []int64, ip string) (his []*model.History, err error)
HistoryType get aids of user view history +wd:ignore
func (*Service) ManagerHistory ¶
func (s *Service) ManagerHistory(c context.Context, onlyAV bool, mid int64) (his []*model.History, err error)
ManagerHistory ManagerHistory. +wd:ignore
func (*Service) ManagerToView ¶
ManagerToView manager get mid toview list. +wd:ignore
func (*Service) Position ¶
func (s *Service) Position(c context.Context, mid int64, aid int64, typ int8) (res *model.History, err error)
Position get view progress from cache/hbase.
func (*Service) Progress ¶
func (s *Service) Progress(c context.Context, mid int64, aids []int64) (res map[int64]*model.History, err error)
Progress get view progress from cache/hbase.
func (*Service) RemainingToView ¶
func (s *Service) RemainingToView(c context.Context, mid int64, ip string) (remaining int, err error)
RemainingToView add toview items to user. +wd:ignore
func (*Service) ToView ¶
func (s *Service) ToView(c context.Context, mid int64, pn, ps int, ip string) (res []*model.ArcToView, count int, err error)
ToView get videos of user view history. +wd:ignore