server

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 creates rpc server.

Types

type RPC

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

RPC .

func (*RPC) Auth

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

Auth check connection success.

func (*RPC) HasLike

func (r *RPC) HasLike(c context.Context, arg *model.ArgHasLike, res *map[int64]int8) (err error)

HasLike query user has liked something

func (*RPC) ItemDislikes

func (r *RPC) ItemDislikes(c context.Context, arg *model.ArgItemLikes, res *[]*model.UserLikeRecord) (err error)

ItemDislikes item dislikes list

func (*RPC) ItemLikes

func (r *RPC) ItemLikes(c context.Context, arg *model.ArgItemLikes, res *[]*model.UserLikeRecord) (err error)

ItemLikes item likes list

func (*RPC) Like

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

Like add like/dislike

func (*RPC) LikeWithStats

func (r *RPC) LikeWithStats(ctx context.Context, arg *model.ArgLike, res *model.Stats) (err error)

LikeWithStats add like/dislike and return the stats info

func (*RPC) Ping

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

Ping checks connection success.

func (*RPC) RawStats

func (r *RPC) RawStats(c context.Context, arg *model.ArgRawStats, res *model.RawStats) (err error)

RawStats get stat changes

func (*RPC) Stats

func (r *RPC) Stats(c context.Context, arg *model.ArgStats, res *map[int64]*model.Stats) (err error)

Stats return stats message

func (*RPC) StatsWithLike

func (r *RPC) StatsWithLike(c context.Context, arg *model.ArgStatsWithLike, res *map[int64]*model.StatsWithLike) (err error)

StatsWithLike return stats and like state

func (*RPC) UpdateCount

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

UpdateCount update count

func (*RPC) UserDislikes

func (r *RPC) UserDislikes(c context.Context, arg *model.ArgUserLikes, res *[]*model.ItemLikeRecord) (err error)

UserDislikes user dislikes list

func (*RPC) UserLikes

func (r *RPC) UserLikes(c context.Context, arg *model.ArgUserLikes, res *[]*model.ItemLikeRecord) (err error)

UserLikes user likes list

func (*RPC) UserTotalLike

func (r *RPC) UserTotalLike(c context.Context, arg *model.ArgUserLikes, res **model.UserTotalLike) (err error)

UserTotalLike user item list with total count

Jump to

Keyboard shortcuts

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