client

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

Overview

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockThumbupRPC

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

MockThumbupRPC is a mock of ThumbupRPC interface

func NewMockThumbupRPC

func NewMockThumbupRPC(ctrl *gomock.Controller) *MockThumbupRPC

NewMockThumbupRPC creates a new mock instance

func (*MockThumbupRPC) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockThumbupRPC) HasLike

func (m *MockThumbupRPC) HasLike(c context.Context, arg *model.ArgHasLike) (map[int64]int8, error)

HasLike mocks base method

func (*MockThumbupRPC) ItemDislikes

func (m *MockThumbupRPC) ItemDislikes(c context.Context, arg *model.ArgItemLikes) ([]*model.UserLikeRecord, error)

ItemDislikes mocks base method

func (*MockThumbupRPC) ItemLikes

ItemLikes mocks base method

func (*MockThumbupRPC) Like

func (m *MockThumbupRPC) Like(c context.Context, arg *model.ArgLike) error

Like mocks base method

func (*MockThumbupRPC) Stats

func (m *MockThumbupRPC) Stats(c context.Context, arg *model.ArgStats) (map[int64]*model.Stats, error)

Stats mocks base method

func (*MockThumbupRPC) StatsWithLike

StatsWithLike mocks base method

func (*MockThumbupRPC) UserDislikes

func (m *MockThumbupRPC) UserDislikes(c context.Context, arg *model.ArgUserLikes) ([]*model.ItemLikeRecord, error)

UserDislikes mocks base method

func (*MockThumbupRPC) UserLikes

UserLikes mocks base method

func (*MockThumbupRPC) UserTotalLike

func (m *MockThumbupRPC) UserTotalLike(c context.Context, arg *model.ArgUserLikes) (*model.UserTotalLike, error)

UserTotalLike mocks base method

type MockThumbupRPCMockRecorder

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

MockThumbupRPCMockRecorder is the mock recorder for MockThumbupRPC

func (*MockThumbupRPCMockRecorder) HasLike

func (mr *MockThumbupRPCMockRecorder) HasLike(c, arg interface{}) *gomock.Call

HasLike indicates an expected call of HasLike

func (*MockThumbupRPCMockRecorder) ItemDislikes

func (mr *MockThumbupRPCMockRecorder) ItemDislikes(c, arg interface{}) *gomock.Call

ItemDislikes indicates an expected call of ItemDislikes

func (*MockThumbupRPCMockRecorder) ItemLikes

func (mr *MockThumbupRPCMockRecorder) ItemLikes(c, arg interface{}) *gomock.Call

ItemLikes indicates an expected call of ItemLikes

func (*MockThumbupRPCMockRecorder) Like

func (mr *MockThumbupRPCMockRecorder) Like(c, arg interface{}) *gomock.Call

Like indicates an expected call of Like

func (*MockThumbupRPCMockRecorder) Stats

func (mr *MockThumbupRPCMockRecorder) Stats(c, arg interface{}) *gomock.Call

Stats indicates an expected call of Stats

func (*MockThumbupRPCMockRecorder) StatsWithLike

func (mr *MockThumbupRPCMockRecorder) StatsWithLike(c, arg interface{}) *gomock.Call

StatsWithLike indicates an expected call of StatsWithLike

func (*MockThumbupRPCMockRecorder) UserDislikes

func (mr *MockThumbupRPCMockRecorder) UserDislikes(c, arg interface{}) *gomock.Call

UserDislikes indicates an expected call of UserDislikes

func (*MockThumbupRPCMockRecorder) UserLikes

func (mr *MockThumbupRPCMockRecorder) UserLikes(c, arg interface{}) *gomock.Call

UserLikes indicates an expected call of UserLikes

func (*MockThumbupRPCMockRecorder) UserTotalLike

func (mr *MockThumbupRPCMockRecorder) UserTotalLike(c, arg interface{}) *gomock.Call

UserTotalLike indicates an expected call of UserTotalLike

type Service

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

Service struct info.

func New

func New(c *rpc.ClientConfig) (s *Service)

New new service instance and return.

func (*Service) HasLike

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

HasLike query user has liked something

func (*Service) ItemDislikes

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

ItemDislikes item dislikes list

func (*Service) ItemLikes

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

ItemLikes item likes list

func (*Service) Like

func (s *Service) Like(c context.Context, arg *model.ArgLike) (err error)

Like add like/dislike

func (*Service) LikeWithStats

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

LikeWithStats add like/dislike and return the stats info

func (*Service) RawStats

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

RawStats get stat changes

func (*Service) Stats

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

Stats return stats message

func (*Service) StatsWithLike

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

StatsWithLike return stats and like state

func (*Service) UpdateCount

func (s *Service) UpdateCount(c context.Context, arg *model.ArgUpdateCount) (err error)

UpdateCount update count

func (*Service) UserDislikes

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

UserDislikes user dislikes list

func (*Service) UserLikes

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

UserLikes user likes list

func (*Service) UserTotalLike

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

UserTotalLike user item list with total count

type ThumbupRPC

type ThumbupRPC interface {
	Like(c context.Context, arg *model.ArgLike) (err error)
	HasLike(c context.Context, arg *model.ArgHasLike) (res map[int64]int8, err error)
	Stats(c context.Context, arg *model.ArgStats) (res map[int64]*model.Stats, err error)
	UserLikes(c context.Context, arg *model.ArgUserLikes) (res []*model.ItemLikeRecord, err error)
	UserDislikes(c context.Context, arg *model.ArgUserLikes) (res []*model.ItemLikeRecord, err error)
	ItemLikes(c context.Context, arg *model.ArgItemLikes) (res []*model.UserLikeRecord, err error)
	ItemDislikes(c context.Context, arg *model.ArgItemLikes) (res []*model.UserLikeRecord, err error)
	StatsWithLike(c context.Context, arg *model.ArgStatsWithLike) (res map[int64]*model.StatsWithLike, err error)
	UserTotalLike(c context.Context, arg *model.ArgUserLikes) (res *model.UserTotalLike, err error)
}

ThumbupRPC rpc interface

Jump to

Keyboard shortcuts

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