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: 23 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 service struct.

func New

func New(c *conf.Config) *Service

New new service.

func (*Service) Add

func (s *Service) Add(c context.Context, mid int64, public int8, name, description, cover, cookie, accessKey string) (pid int64, err error)

Add add playlist.

func (*Service) AddFavorite

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

AddFavorite add playlist to favorite.

func (*Service) AddVideo

func (s *Service) AddVideo(c context.Context, mid, pid int64, aids []int64) (videos model.Videos, err error)

AddVideo add video to playlist.

func (*Service) CheckVideo

func (s *Service) CheckVideo(c context.Context, mid, pid int64, aids []int64) (videos model.Videos, err error)

CheckVideo add video to playlist.

func (*Service) Del

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

Del delete playlist.

func (*Service) DelFavorite

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

DelFavorite del playlist from favorite.

func (*Service) DelVideo

func (s *Service) DelVideo(c context.Context, mid, pid int64, aids []int64) (err error)

DelVideo del video from playlist.

func (*Service) EditVideoDesc

func (s *Service) EditVideoDesc(c context.Context, mid, pid, aid int64, desc string) (err error)

EditVideoDesc edit playlist video desc.

func (*Service) Info

func (s *Service) Info(c context.Context, mid, pid int64) (res *model.Playlist, err error)

Info playlist stat info.

func (*Service) List

func (s *Service) List(c context.Context, mid int64, pn, ps, sortType int) (res []*model.Playlist, count int, err error)

List playlist.

func (*Service) ListFavorite

func (s *Service) ListFavorite(c context.Context, mid, vmid int64, pn, ps, sortType int) (res []*model.Playlist, count int, err error)

ListFavorite playlist list.

func (*Service) Ping

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

Ping ping service.

func (*Service) PubShare

func (s *Service) PubShare(c context.Context, pid, aid int64) (err error)

PubShare pub playlist share.

func (*Service) PubView

func (s *Service) PubView(c context.Context, pid, aid int64) (err error)

PubView pub playlist view.

func (*Service) SearchVideos

func (s *Service) SearchVideos(c context.Context, pn, ps int, query string) (res []*model.SearchArc, count int, err error)

SearchVideos search add videos.

func (*Service) SetStat

func (s *Service) SetStat(c context.Context, arg *model.PlStat) (err error)

SetStat set playlist stat cache.

func (*Service) SortVideo

func (s *Service) SortVideo(c context.Context, mid, pid, aid, sort int64) (err error)

SortVideo sort playlist video.

func (*Service) ToView

func (s *Service) ToView(c context.Context, mid, pid int64) (res *model.ToView, err error)

ToView get playlist view page data.

func (*Service) Update

func (s *Service) Update(c context.Context, mid, pid int64, public int8, name, description, cover, cookie, accessKey string) (err error)

Update update playlist.

func (*Service) Videos

func (s *Service) Videos(c context.Context, pid int64, pn, ps int) (res *model.ArcList, err error)

Videos get playlist video list by pid.

func (*Service) White

func (s *Service) White(c context.Context, mid int64) (res map[string]bool, err error)

White playlist white list.

Jump to

Keyboard shortcuts

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