Documentation ¶
Index ¶
- type Service
- func (s *Service) AddArc(c context.Context, mid, fid, aid int64, ck, ak string) (err error)
- func (s *Service) AddArcToFolders(c context.Context, mid, aid int64, fids []int64, ck, ak string) (err error)
- func (s *Service) AddFavFolder(c context.Context, mid int64, name, cookie, accessKey string, state int32) (fid int64, err error)
- func (s *Service) AddFavRPC(c context.Context, typ int8, mid, aid, fid int64) (err error)
- func (s *Service) AddFavTopic(c context.Context, mid, tpID int64, ck, ak string) (err error)
- func (s *Service) AllFoldersRPC(c context.Context, typ int8, mid, vmid, oid int64, ip string) (fs []*favmdl.Folder, err error)
- func (s *Service) ArcRPC(c context.Context, aid int64) (a *api.Arc, err error)
- func (s *Service) ArcsRPC(c context.Context, aids []int64) (as map[int64]*api.Arc, err error)
- func (s *Service) CleanInvalidArcs(c context.Context, mid, fid int64) (err error)
- func (s *Service) CleanState(c context.Context, mid, fid int64) (cleanState int, err error)
- func (s *Service) Close()
- func (s *Service) CopyArcs(c context.Context, mid, oldmid, oldfid, newfid int64, aids []int64) (err error)
- func (s *Service) DelArc(c context.Context, mid, fid, aid int64) (err error)
- func (s *Service) DelArcs(c context.Context, mid, fid int64, aids []int64) (err error)
- func (s *Service) DelFavRPC(c context.Context, typ int8, mid, aid, fid int64) (err error)
- func (s *Service) DelFavTopic(c context.Context, mid, tpID int64) (err error)
- func (s *Service) DelVideoFolder(c context.Context, mid, fid int64) (err error)
- func (s *Service) FavFolders(c context.Context, mid, vmid, uid, aid int64, isSelf bool, mediaList bool, ...) (res []*model.VideoFolder, err error)
- func (s *Service) FavTopics(c context.Context, mid int64, pn, ps int, appInfo *model.AppInfo) (res *model.TopicList, err error)
- func (s *Service) FavVideo(c context.Context, mid, vmid, uid, fid int64, keyword, order string, ...) (sv *model.SearchArchive, err error)
- func (s *Service) FavoritesRPC(c context.Context, typ int8, mid, vmid, fid int64, tid int, ...) (favs *favmdl.Favorites, err error)
- func (s *Service) FolderRPC(c context.Context, typ int8, fid, mid, vmid int64) (f *favmdl.Folder, err error)
- func (s *Service) InDef(c context.Context, mid, aid int64) (isin bool, err error)
- func (s *Service) InDefaultRPC(c context.Context, typ int8, mid, aid int64) (res bool, err error)
- func (s *Service) IsFavByFidRPC(c context.Context, typ int8, mid, aid int64, fid int64) (res bool, err error)
- func (s *Service) IsFavRPC(c context.Context, typ int8, mid, aid int64) (res bool, err error)
- func (s *Service) IsFaved(c context.Context, mid, aid int64) (faved bool, count int, err error)
- func (s *Service) IsFaveds(c context.Context, mid int64, aids []int64) (m map[int64]bool, err error)
- func (s *Service) IsFavsRPC(c context.Context, typ int8, mid int64, aids []int64) (res map[int64]bool, err error)
- func (s *Service) IsTopicFavoured(c context.Context, mid, tpID int64) (faved bool, err error)
- func (s *Service) MoveArcs(c context.Context, mid, oldfid, newfid int64, aids []int64) (err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) PromError(name string, format string, args ...interface{})
- func (s *Service) RecentArcs(c context.Context, mid int64, pageNum, pageSize int) (sv *model.SearchArchive, err error)
- func (s *Service) RecentsRPC(c context.Context, typ int8, mid int64, size int) (aids []int64, err error)
- func (s *Service) SetVideoFolderSort(c context.Context, mid int64, fids []int64) (err error)
- func (s *Service) TidList(c context.Context, mid, vmid, uid, fid int64) (res []*model.Partition, err error)
- func (s *Service) TlistsRPC(c context.Context, typ int8, mid, vmid, fid int64) (ps []*favmdl.Partition, err error)
- func (s *Service) TypesRPC(c context.Context) (ats map[int16]*arcmdl.ArcType, err error)
- func (s *Service) UpFavName(c context.Context, mid, fid int64, name, cookie, accessKey string) (err error)
- func (s *Service) UpFavState(c context.Context, mid, fid int64, public int32, cookie string, ...) (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 define fav service
func (*Service) AddArcToFolders ¶
func (s *Service) AddArcToFolders(c context.Context, mid, aid int64, fids []int64, ck, ak string) (err error)
AddArcToFolders add a archive into multi folders.
func (*Service) AddFavFolder ¶
func (s *Service) AddFavFolder(c context.Context, mid int64, name, cookie, accessKey string, state int32) (fid int64, err error)
AddFavFolder add a new favorite folder
func (*Service) AddFavTopic ¶
AddFavTopic add fav topic
func (*Service) AllFoldersRPC ¶
func (s *Service) AllFoldersRPC(c context.Context, typ int8, mid, vmid, oid int64, ip string) (fs []*favmdl.Folder, err error)
AllFoldersRPC user's folders list.
func (*Service) CleanInvalidArcs ¶
CleanInvalidArcs clean invalid archives.
func (*Service) CleanState ¶
CleanState return this folder clean state.
func (*Service) CopyArcs ¶
func (s *Service) CopyArcs(c context.Context, mid, oldmid, oldfid, newfid int64, aids []int64) (err error)
CopyArcs copy archives to other favorite.
func (*Service) DelFavTopic ¶
DelFavTopic del fav topic
func (*Service) DelVideoFolder ¶
DelVideoFolder delete favFolder and push databus msg to del videos in folder.
func (*Service) FavFolders ¶
func (s *Service) FavFolders(c context.Context, mid, vmid, uid, aid int64, isSelf bool, mediaList bool, fromWeb bool) (res []*model.VideoFolder, err error)
FavFolders get mid user's favorites.
func (*Service) FavTopics ¶
func (s *Service) FavTopics(c context.Context, mid int64, pn, ps int, appInfo *model.AppInfo) (res *model.TopicList, err error)
FavTopics get fav topics
func (*Service) FavVideo ¶
func (s *Service) FavVideo(c context.Context, mid, vmid, uid, fid int64, keyword, order string, tid, pn, ps int) (sv *model.SearchArchive, err error)
FavVideo get fav videos from search or db
func (*Service) FavoritesRPC ¶
func (s *Service) FavoritesRPC(c context.Context, typ int8, mid, vmid, fid int64, tid int, keyword, order string, pn, ps int) (favs *favmdl.Favorites, err error)
FavoritesRPC favorites list.
func (*Service) FolderRPC ¶
func (s *Service) FolderRPC(c context.Context, typ int8, fid, mid, vmid int64) (f *favmdl.Folder, err error)
FolderRPC user's folder .
func (*Service) InDefaultRPC ¶
InDefaultRPC return aid whether in default fodler.
func (*Service) IsFavByFidRPC ¶
func (s *Service) IsFavByFidRPC(c context.Context, typ int8, mid, aid int64, fid int64) (res bool, err error)
IsFavByFidRPC return user whether favored
func (*Service) IsFaveds ¶
func (s *Service) IsFaveds(c context.Context, mid int64, aids []int64) (m map[int64]bool, err error)
IsFaveds check if aids faved by user
func (*Service) IsFavsRPC ¶
func (s *Service) IsFavsRPC(c context.Context, typ int8, mid int64, aids []int64) (res map[int64]bool, err error)
IsFavsRPC return user's oids whether favored
func (*Service) IsTopicFavoured ¶
IsTopicFavoured topic is favoured.
func (*Service) RecentArcs ¶
func (s *Service) RecentArcs(c context.Context, mid int64, pageNum, pageSize int) (sv *model.SearchArchive, err error)
RecentArcs return the newest archives in all folder.
func (*Service) RecentsRPC ¶
func (s *Service) RecentsRPC(c context.Context, typ int8, mid int64, size int) (aids []int64, err error)
RecentsRPC recent favs .
func (*Service) SetVideoFolderSort ¶
SetVideoFolderSort set folder sort.
func (*Service) TidList ¶
func (s *Service) TidList(c context.Context, mid, vmid, uid, fid int64) (res []*model.Partition, err error)
TidList get video folder type names from search.
func (*Service) TlistsRPC ¶
func (s *Service) TlistsRPC(c context.Context, typ int8, mid, vmid, fid int64) (ps []*favmdl.Partition, err error)
TlistsRPC archive type list.