service

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

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 New

func New(c *conf.Config) (s *Service)

New new a History service.

func (*Service) AVHistories

func (s *Service) AVHistories(c context.Context, mid int64) (hs []*model.History, err error)

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

func (s *Service) AddHistory(c context.Context, mid, rtime int64, h *model.History) (err error)

AddHistory add hisotry progress into hbase.

func (*Service) AddMultiToView

func (s *Service) AddMultiToView(c context.Context, mid int64, aids []int64, ip string) (err error)

AddMultiToView add toview items to user. +wd:ignore

func (*Service) AddToView

func (s *Service) AddToView(c context.Context, mid, aid int64, ip string) (err error)

AddToView add the user a toview item. +wd:ignore

func (*Service) ClearHistory

func (s *Service) ClearHistory(c context.Context, mid int64, tps []int8) (err error)

ClearHistory clear user's historys.

func (*Service) ClearToView

func (s *Service) ClearToView(c context.Context, mid int64) (err error)

ClearToView clear the user toview items. +wd:ignore

func (*Service) Close

func (s *Service) Close()

Close close resource. +wd:ignore

func (*Service) DelHistory

func (s *Service) DelHistory(ctx context.Context, mid int64, aids []int64, typ int8) (err error)

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) Delete

func (s *Service) Delete(ctx context.Context, mid int64, his []*model.History) (err error)

Delete .

func (*Service) FlushHistory

func (s *Service) FlushHistory(c context.Context, mids []int64, stime int64) (err error)

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

func (s *Service) ManagerToView(c context.Context, mid int64, ip string) ([]*model.ToView, error)

ManagerToView manager get mid toview list. +wd:ignore

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping ping service. +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) SetShadow

func (s *Service) SetShadow(c context.Context, mid, value int64) (err error)

SetShadow set the user switch. +wd:ignore

func (*Service) Shadow

func (s *Service) Shadow(c context.Context, mid int64) (value int64, err error)

Shadow return the user switch by mid. +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

func (*Service) Videos

func (s *Service) Videos(c context.Context, mid int64, pn, ps int, typ int8) (res []*model.Video, err error)

Videos get videos of user view history. +wd:ignore

func (*Service) WebToView

func (s *Service) WebToView(c context.Context, mid int64, pn, ps int, ip string) (res []*model.WebArcToView, count int, err error)

WebToView get videos of user view history. +wd:ignore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL