rpc

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *conf.Config, s *service.Service) (svr *rpc.Server)

New init rpc.

Types

type RPC

type RPC struct {
	// contains filtered or unexported fields
}

RPC favorite rpc.

func (*RPC) Add

func (r *RPC) Add(c context.Context, a *model.ArgAdd, res *struct{}) (err error)

Add add a favorite relation.

func (*RPC) AddFolder

func (r *RPC) AddFolder(c context.Context, a *model.ArgAddFolder, res *int64) (err error)

AddFolder add a Folder.

func (*RPC) AddVideo

func (r *RPC) AddVideo(c context.Context, a *model.ArgAddVideo, res *struct{}) (err error)

AddVideo add a favorite video.

func (*RPC) Adds

func (r *RPC) Adds(c context.Context, a *model.ArgAdds, res *struct{}) (err error)

Adds add a resource to folders.

func (*RPC) AllFolders

func (r *RPC) AllFolders(c context.Context, a *model.ArgAllFolders, res *[]*model.Folder) (err error)

AllFolders return users folders.

func (*RPC) CntUserFolders

func (r *RPC) CntUserFolders(c context.Context, a *model.ArgCntUserFolders, count *int) (err error)

CntUserFolders count user's folders.

func (*RPC) Del

func (r *RPC) Del(c context.Context, a *model.ArgDel, res *struct{}) (err error)

Del del a favorite relation.

func (*RPC) DelFolder

func (r *RPC) DelFolder(c context.Context, a *model.ArgDelFolder, res *struct{}) (err error)

DelFolder del a folder.

func (*RPC) Dels

func (r *RPC) Dels(c context.Context, a *model.ArgDels, res *struct{}) (err error)

Dels del a resource in fodlers.

func (*RPC) Favorites

func (r *RPC) Favorites(c context.Context, a *model.ArgFavs, res *model.Favorites) (err error)

Favorites return favorites by mid.

func (*RPC) Folder

func (r *RPC) Folder(c context.Context, a *model.ArgFolder, res *model.Folder) (err error)

Folder return folder by mid.

func (*RPC) Folders

func (r *RPC) Folders(c context.Context, a *model.ArgFolders, res *[]*model.Folder) (err error)

Folders return folder by mid.

func (*RPC) InDefault

func (r *RPC) InDefault(c context.Context, a *model.ArgInDefaultFolder, in *bool) (err error)

InDefault return favored in default folder.

func (*RPC) IsFav

func (r *RPC) IsFav(c context.Context, a *model.ArgIsFav, faved *bool) (err error)

IsFav check favorited relation.

func (*RPC) IsFavedByFid

func (r *RPC) IsFavedByFid(c context.Context, a *model.ArgIsFavedByFid, faved *bool) (err error)

IsFavedByFid check the oid and fid relation.

func (*RPC) IsFavs

func (r *RPC) IsFavs(c context.Context, a *model.ArgIsFavs, res *map[int64]bool) (err error)

IsFavs return favored relation map.

func (*RPC) MultiAdd

func (r *RPC) MultiAdd(c context.Context, a *model.ArgMultiAdd, res *struct{}) (err error)

MultiAdd multi add favorite relations.

func (*RPC) MultiDel

func (r *RPC) MultiDel(c context.Context, a *model.ArgMultiDel, res *struct{}) (err error)

MultiDel multi del favorite relations.

func (*RPC) Ping

func (r *RPC) Ping(c context.Context, arg *struct{}, res *struct{}) (err error)

Ping check connection success.

func (*RPC) UpdateFolder

func (r *RPC) UpdateFolder(c context.Context, a *model.ArgUpdateFolder, res *struct{}) (err error)

UpdateFolder update a Folder.

func (*RPC) Users

func (r *RPC) Users(c context.Context, a *model.ArgUsers, res *model.UserList) (err error)

Users return favored users by mid.

Jump to

Keyboard shortcuts

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