grpc_mocks

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockTestServiceServer

type MockTestServiceServer struct {
	grpc_testing.UnimplementedTestServiceServer
	mock.Mock
}

MockTestServiceServer is an autogenerated mock type for the TestServiceServer type

func NewMockTestServiceServer

func NewMockTestServiceServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTestServiceServer

NewMockTestServiceServer creates a new instance of MockTestServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTestServiceServer) CacheableUnaryCall

func (_mock *MockTestServiceServer) CacheableUnaryCall(context1 context.Context, simpleRequest *grpc_testing.SimpleRequest) (*grpc_testing.SimpleResponse, error)

CacheableUnaryCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) EXPECT

func (*MockTestServiceServer) EmptyCall

func (_mock *MockTestServiceServer) EmptyCall(context1 context.Context, empty *grpc_testing.Empty) (*grpc_testing.Empty, error)

EmptyCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) FullDuplexCall

FullDuplexCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) HalfDuplexCall

HalfDuplexCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) StreamingInputCall

StreamingInputCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) StreamingOutputCall

func (_mock *MockTestServiceServer) StreamingOutputCall(streamingOutputCallRequest *grpc_testing.StreamingOutputCallRequest, serverStreamingServer grpc.ServerStreamingServer[grpc_testing.StreamingOutputCallResponse]) error

StreamingOutputCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) UnaryCall

func (_mock *MockTestServiceServer) UnaryCall(context1 context.Context, simpleRequest *grpc_testing.SimpleRequest) (*grpc_testing.SimpleResponse, error)

UnaryCall provides a mock function for the type MockTestServiceServer

func (*MockTestServiceServer) UnimplementedCall

func (_mock *MockTestServiceServer) UnimplementedCall(context1 context.Context, empty *grpc_testing.Empty) (*grpc_testing.Empty, error)

UnimplementedCall provides a mock function for the type MockTestServiceServer

type MockTestServiceServer_CacheableUnaryCall_Call

type MockTestServiceServer_CacheableUnaryCall_Call struct {
	*mock.Call
}

MockTestServiceServer_CacheableUnaryCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CacheableUnaryCall'

func (*MockTestServiceServer_CacheableUnaryCall_Call) Return

func (*MockTestServiceServer_CacheableUnaryCall_Call) Run

func (*MockTestServiceServer_CacheableUnaryCall_Call) RunAndReturn

type MockTestServiceServer_EmptyCall_Call

type MockTestServiceServer_EmptyCall_Call struct {
	*mock.Call
}

MockTestServiceServer_EmptyCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EmptyCall'

func (*MockTestServiceServer_EmptyCall_Call) Return

func (*MockTestServiceServer_EmptyCall_Call) Run

func (*MockTestServiceServer_EmptyCall_Call) RunAndReturn

type MockTestServiceServer_Expecter

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

func (*MockTestServiceServer_Expecter) CacheableUnaryCall

func (_e *MockTestServiceServer_Expecter) CacheableUnaryCall(context1 interface{}, simpleRequest interface{}) *MockTestServiceServer_CacheableUnaryCall_Call

CacheableUnaryCall is a helper method to define mock.On call

  • context1 context.Context
  • simpleRequest *grpc_testing.SimpleRequest

func (*MockTestServiceServer_Expecter) EmptyCall

func (_e *MockTestServiceServer_Expecter) EmptyCall(context1 interface{}, empty interface{}) *MockTestServiceServer_EmptyCall_Call

EmptyCall is a helper method to define mock.On call

  • context1 context.Context
  • empty *grpc_testing.Empty

func (*MockTestServiceServer_Expecter) FullDuplexCall

func (_e *MockTestServiceServer_Expecter) FullDuplexCall(bidiStreamingServer interface{}) *MockTestServiceServer_FullDuplexCall_Call

FullDuplexCall is a helper method to define mock.On call

  • bidiStreamingServer grpc.BidiStreamingServer[grpc_testing.StreamingOutputCallRequest, grpc_testing.StreamingOutputCallResponse]

func (*MockTestServiceServer_Expecter) HalfDuplexCall

func (_e *MockTestServiceServer_Expecter) HalfDuplexCall(bidiStreamingServer interface{}) *MockTestServiceServer_HalfDuplexCall_Call

HalfDuplexCall is a helper method to define mock.On call

  • bidiStreamingServer grpc.BidiStreamingServer[grpc_testing.StreamingOutputCallRequest, grpc_testing.StreamingOutputCallResponse]

func (*MockTestServiceServer_Expecter) StreamingInputCall

func (_e *MockTestServiceServer_Expecter) StreamingInputCall(clientStreamingServer interface{}) *MockTestServiceServer_StreamingInputCall_Call

StreamingInputCall is a helper method to define mock.On call

  • clientStreamingServer grpc.ClientStreamingServer[grpc_testing.StreamingInputCallRequest, grpc_testing.StreamingInputCallResponse]

func (*MockTestServiceServer_Expecter) StreamingOutputCall

func (_e *MockTestServiceServer_Expecter) StreamingOutputCall(streamingOutputCallRequest interface{}, serverStreamingServer interface{}) *MockTestServiceServer_StreamingOutputCall_Call

StreamingOutputCall is a helper method to define mock.On call

  • streamingOutputCallRequest *grpc_testing.StreamingOutputCallRequest
  • serverStreamingServer grpc.ServerStreamingServer[grpc_testing.StreamingOutputCallResponse]

func (*MockTestServiceServer_Expecter) UnaryCall

func (_e *MockTestServiceServer_Expecter) UnaryCall(context1 interface{}, simpleRequest interface{}) *MockTestServiceServer_UnaryCall_Call

UnaryCall is a helper method to define mock.On call

  • context1 context.Context
  • simpleRequest *grpc_testing.SimpleRequest

func (*MockTestServiceServer_Expecter) UnimplementedCall

func (_e *MockTestServiceServer_Expecter) UnimplementedCall(context1 interface{}, empty interface{}) *MockTestServiceServer_UnimplementedCall_Call

UnimplementedCall is a helper method to define mock.On call

  • context1 context.Context
  • empty *grpc_testing.Empty

type MockTestServiceServer_FullDuplexCall_Call

type MockTestServiceServer_FullDuplexCall_Call struct {
	*mock.Call
}

MockTestServiceServer_FullDuplexCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FullDuplexCall'

func (*MockTestServiceServer_FullDuplexCall_Call) Return

type MockTestServiceServer_HalfDuplexCall_Call

type MockTestServiceServer_HalfDuplexCall_Call struct {
	*mock.Call
}

MockTestServiceServer_HalfDuplexCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HalfDuplexCall'

func (*MockTestServiceServer_HalfDuplexCall_Call) Return

type MockTestServiceServer_StreamingInputCall_Call

type MockTestServiceServer_StreamingInputCall_Call struct {
	*mock.Call
}

MockTestServiceServer_StreamingInputCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamingInputCall'

func (*MockTestServiceServer_StreamingInputCall_Call) Return

type MockTestServiceServer_StreamingOutputCall_Call

type MockTestServiceServer_StreamingOutputCall_Call struct {
	*mock.Call
}

MockTestServiceServer_StreamingOutputCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamingOutputCall'

func (*MockTestServiceServer_StreamingOutputCall_Call) Return

func (*MockTestServiceServer_StreamingOutputCall_Call) Run

func (*MockTestServiceServer_StreamingOutputCall_Call) RunAndReturn

type MockTestServiceServer_UnaryCall_Call

type MockTestServiceServer_UnaryCall_Call struct {
	*mock.Call
}

MockTestServiceServer_UnaryCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnaryCall'

func (*MockTestServiceServer_UnaryCall_Call) Return

func (*MockTestServiceServer_UnaryCall_Call) Run

func (*MockTestServiceServer_UnaryCall_Call) RunAndReturn

type MockTestServiceServer_UnimplementedCall_Call

type MockTestServiceServer_UnimplementedCall_Call struct {
	*mock.Call
}

MockTestServiceServer_UnimplementedCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnimplementedCall'

func (*MockTestServiceServer_UnimplementedCall_Call) Return

func (*MockTestServiceServer_UnimplementedCall_Call) Run

func (*MockTestServiceServer_UnimplementedCall_Call) RunAndReturn

type MockTestServiceServer_mustEmbedUnimplementedTestServiceServer_Call

type MockTestServiceServer_mustEmbedUnimplementedTestServiceServer_Call struct {
	*mock.Call
}

MockTestServiceServer_mustEmbedUnimplementedTestServiceServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedTestServiceServer'

func (*MockTestServiceServer_mustEmbedUnimplementedTestServiceServer_Call) Return

func (*MockTestServiceServer_mustEmbedUnimplementedTestServiceServer_Call) Run

func (*MockTestServiceServer_mustEmbedUnimplementedTestServiceServer_Call) RunAndReturn

Jump to

Keyboard shortcuts

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