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

Documentation

Overview

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyReply = errors.New("rpc empty reply")
)

ERROR

Functions

This section is empty.

Types

type AccRPC

type AccRPC interface {
	Info3(ctx context.Context, in *account.MidReq, opts ...grpc.CallOption) (*account.InfoReply, error)
	Cards3(ctx context.Context, in *account.MidsReq, opts ...grpc.CallOption) (*account.CardsReply, error)
	ProfileWithStat3(ctx context.Context, in *account.MidReq, opts ...grpc.CallOption) (*account.ProfileStatReply, error)
}

AccRPC .

type Dao

type Dao struct {

	//grpc
	AccountClient AccRPC
	UpClient      UpRPC
	// contains filtered or unexported fields
}

Dao dao

func New

func New(c *conf.Config) (dao *Dao)

New init mysql db

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) FansCount

func (d *Dao) FansCount(c context.Context, mids []int64) (fans map[int64]int64, err error)

FansCount 粉丝数

func (*Dao) Info3

func (d *Dao) Info3(c context.Context, mid int64) (res *acc.Info, err error)

Info3 get Name.

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) error

Ping dao ping

func (*Dao) Profile

func (d *Dao) Profile(c context.Context, mid int64) (userinfo *model.UserInfo, err error)

Profile get account.

func (*Dao) UpGroups

func (d *Dao) UpGroups(c context.Context) (upgs map[int64]*uprpc.UpGroup, err error)

UpGroups 所有分组

func (*Dao) UpSpecial

func (d *Dao) UpSpecial(c context.Context, mid int64) (ups *uprpc.UpSpecial, err error)

UpSpecial 分组信息

func (*Dao) UpsSpecial

func (d *Dao) UpsSpecial(c context.Context, mids []int64) (ups map[int64]*uprpc.UpSpecial, err error)

UpsSpecial 分组信息

func (*Dao) UserInfos

func (d *Dao) UserInfos(c context.Context, mids []int64) (res map[int64]*model.UserInfo, err error)

UserInfos 提供给资源列表批量查

type MockAccRPC

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

MockAccRPC is a mock of AccRPC interface

func NewMockAccRPC

func NewMockAccRPC(ctrl *gomock.Controller) *MockAccRPC

NewMockAccRPC creates a new mock instance

func (*MockAccRPC) Cards3

func (m *MockAccRPC) Cards3(ctx context.Context, in *api.MidsReq, opts ...grpc.CallOption) (*api.CardsReply, error)

Cards3 mocks base method

func (*MockAccRPC) EXPECT

func (m *MockAccRPC) EXPECT() *MockAccRPCMockRecorder

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

func (*MockAccRPC) Info3

func (m *MockAccRPC) Info3(ctx context.Context, in *api.MidReq, opts ...grpc.CallOption) (*api.InfoReply, error)

Info3 mocks base method

func (*MockAccRPC) ProfileWithStat3

func (m *MockAccRPC) ProfileWithStat3(ctx context.Context, in *api.MidReq, opts ...grpc.CallOption) (*api.ProfileStatReply, error)

ProfileWithStat3 mocks base method

type MockAccRPCMockRecorder

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

MockAccRPCMockRecorder is the mock recorder for MockAccRPC

func (*MockAccRPCMockRecorder) Cards3

func (mr *MockAccRPCMockRecorder) Cards3(ctx, in interface{}, opts ...interface{}) *gomock.Call

Cards3 indicates an expected call of Cards3

func (*MockAccRPCMockRecorder) Info3

func (mr *MockAccRPCMockRecorder) Info3(ctx, in interface{}, opts ...interface{}) *gomock.Call

Info3 indicates an expected call of Info3

func (*MockAccRPCMockRecorder) ProfileWithStat3

func (mr *MockAccRPCMockRecorder) ProfileWithStat3(ctx, in interface{}, opts ...interface{}) *gomock.Call

ProfileWithStat3 indicates an expected call of ProfileWithStat3

type MockRelationRPC

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

MockRelationRPC is a mock of RelationRPC interface

func NewMockRelationRPC

func NewMockRelationRPC(ctrl *gomock.Controller) *MockRelationRPC

NewMockRelationRPC creates a new mock instance

func (*MockRelationRPC) EXPECT

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

func (*MockRelationRPC) Stats

func (m *MockRelationRPC) Stats(c context.Context, arg *model.ArgMids) (map[int64]*model.Stat, error)

Stats mocks base method

type MockRelationRPCMockRecorder

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

MockRelationRPCMockRecorder is the mock recorder for MockRelationRPC

func (*MockRelationRPCMockRecorder) Stats

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

Stats indicates an expected call of Stats

type MockUpRPC

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

MockUpRPC is a mock of UpRPC interface

func NewMockUpRPC

func NewMockUpRPC(ctrl *gomock.Controller) *MockUpRPC

NewMockUpRPC creates a new mock instance

func (*MockUpRPC) EXPECT

func (m *MockUpRPC) EXPECT() *MockUpRPCMockRecorder

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

func (*MockUpRPC) UpGroups

func (m *MockUpRPC) UpGroups(ctx context.Context, in *v1.NoArgReq, opts ...grpc.CallOption) (*v1.UpGroupsReply, error)

UpGroups mocks base method

func (*MockUpRPC) UpSpecial

func (m *MockUpRPC) UpSpecial(ctx context.Context, in *v1.UpSpecialReq, opts ...grpc.CallOption) (*v1.UpSpecialReply, error)

UpSpecial mocks base method

func (*MockUpRPC) UpsSpecial

func (m *MockUpRPC) UpsSpecial(ctx context.Context, in *v1.UpsSpecialReq, opts ...grpc.CallOption) (*v1.UpsSpecialReply, error)

UpsSpecial mocks base method

type MockUpRPCMockRecorder

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

MockUpRPCMockRecorder is the mock recorder for MockUpRPC

func (*MockUpRPCMockRecorder) UpGroups

func (mr *MockUpRPCMockRecorder) UpGroups(ctx, in interface{}, opts ...interface{}) *gomock.Call

UpGroups indicates an expected call of UpGroups

func (*MockUpRPCMockRecorder) UpSpecial

func (mr *MockUpRPCMockRecorder) UpSpecial(ctx, in interface{}, opts ...interface{}) *gomock.Call

UpSpecial indicates an expected call of UpSpecial

func (*MockUpRPCMockRecorder) UpsSpecial

func (mr *MockUpRPCMockRecorder) UpsSpecial(ctx, in interface{}, opts ...interface{}) *gomock.Call

UpsSpecial indicates an expected call of UpsSpecial

type RelationRPC

type RelationRPC interface {
	Stats(c context.Context, arg *relmod.ArgMids) (res map[int64]*relmod.Stat, err error)
}

RelationRPC .

type UpRPC

type UpRPC interface {
	UpSpecial(ctx context.Context, in *uprpc.UpSpecialReq, opts ...grpc.CallOption) (*uprpc.UpSpecialReply, error)
	UpsSpecial(ctx context.Context, in *uprpc.UpsSpecialReq, opts ...grpc.CallOption) (*uprpc.UpsSpecialReply, error)
	UpGroups(ctx context.Context, in *uprpc.NoArgReq, opts ...grpc.CallOption) (*uprpc.UpGroupsReply, error)
}

UpRPC .

Jump to

Keyboard shortcuts

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