Documentation ¶
Overview ¶
Package testproto is a generated GoMock package.
Index ¶
- Constants
- Variables
- func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer)
- type MockTestServiceServer
- type MockTestServiceServerMockRecorder
- type TestRequest
- type TestResponse
- type TestServiceClient
- type TestServiceServer
- type UnimplementedTestServiceServer
- type UnsafeTestServiceServer
Constants ¶
const (
TestService_TestRPC_FullMethodName = "/TestService/TestRPC"
)
Variables ¶
var File_test_proto protoreflect.FileDescriptor
var TestService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "TestService", HandlerType: (*TestServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestRPC", Handler: _TestService_TestRPC_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "test.proto", }
TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTestServiceServer ¶
func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer)
Types ¶
type MockTestServiceServer ¶
type MockTestServiceServer struct {
// contains filtered or unexported fields
}
MockTestServiceServer is a mock of TestServiceServer interface.
func NewMockTestServiceServer ¶
func NewMockTestServiceServer(ctrl *gomock.Controller) *MockTestServiceServer
NewMockTestServiceServer creates a new mock instance.
func (*MockTestServiceServer) EXPECT ¶
func (m *MockTestServiceServer) EXPECT() *MockTestServiceServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTestServiceServer) TestRPC ¶
func (m *MockTestServiceServer) TestRPC(arg0 context.Context, arg1 *TestRequest) (*TestResponse, error)
TestRPC mocks base method.
type MockTestServiceServerMockRecorder ¶
type MockTestServiceServerMockRecorder struct {
// contains filtered or unexported fields
}
MockTestServiceServerMockRecorder is the mock recorder for MockTestServiceServer.
func (*MockTestServiceServerMockRecorder) TestRPC ¶
func (mr *MockTestServiceServerMockRecorder) TestRPC(arg0, arg1 interface{}) *gomock.Call
TestRPC indicates an expected call of TestRPC.
type TestRequest ¶
type TestRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*TestRequest) Descriptor
deprecated
func (*TestRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.
func (*TestRequest) GetId ¶
func (x *TestRequest) GetId() string
func (*TestRequest) ProtoMessage ¶
func (*TestRequest) ProtoMessage()
func (*TestRequest) ProtoReflect ¶
func (x *TestRequest) ProtoReflect() protoreflect.Message
func (*TestRequest) Reset ¶
func (x *TestRequest) Reset()
func (*TestRequest) String ¶
func (x *TestRequest) String() string
type TestResponse ¶
type TestResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*TestResponse) Descriptor
deprecated
func (*TestResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.
func (*TestResponse) GetCode ¶
func (x *TestResponse) GetCode() int32
func (*TestResponse) ProtoMessage ¶
func (*TestResponse) ProtoMessage()
func (*TestResponse) ProtoReflect ¶
func (x *TestResponse) ProtoReflect() protoreflect.Message
func (*TestResponse) Reset ¶
func (x *TestResponse) Reset()
func (*TestResponse) String ¶
func (x *TestResponse) String() string
type TestServiceClient ¶
type TestServiceClient interface {
TestRPC(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
}
TestServiceClient is the client API for TestService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTestServiceClient ¶
func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient
type TestServiceServer ¶
type TestServiceServer interface { TestRPC(context.Context, *TestRequest) (*TestResponse, error) // contains filtered or unexported methods }
TestServiceServer is the server API for TestService service. All implementations must embed UnimplementedTestServiceServer for forward compatibility
type UnimplementedTestServiceServer ¶
type UnimplementedTestServiceServer struct { }
UnimplementedTestServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTestServiceServer) TestRPC ¶
func (UnimplementedTestServiceServer) TestRPC(context.Context, *TestRequest) (*TestResponse, error)
type UnsafeTestServiceServer ¶
type UnsafeTestServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestServiceServer will result in compilation errors.