Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMockServiceServer(s grpc.ServiceRegistrar, srv MockServiceServer)
- type HelloWorldRequest
- type HelloWorldResponse
- func (*HelloWorldResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HelloWorldResponse) GetAnswer() string
- func (*HelloWorldResponse) ProtoMessage()
- func (x *HelloWorldResponse) ProtoReflect() protoreflect.Message
- func (x *HelloWorldResponse) Reset()
- func (x *HelloWorldResponse) String() string
- type MockServiceClient
- type MockServiceServer
- type UnimplementedMockServiceServer
- type UnsafeMockServiceServer
Constants ¶
const (
MockService_HelloWorld_FullMethodName = "/private.mock.v1.MockService/HelloWorld"
)
Variables ¶
var File_private_mock_v1_mock_service_proto protoreflect.FileDescriptor
var MockService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "private.mock.v1.MockService", HandlerType: (*MockServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HelloWorld", Handler: _MockService_HelloWorld_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "private/mock/v1/mock_service.proto", }
MockService_ServiceDesc is the grpc.ServiceDesc for MockService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMockServiceServer ¶
func RegisterMockServiceServer(s grpc.ServiceRegistrar, srv MockServiceServer)
Types ¶
type HelloWorldRequest ¶
type HelloWorldRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*HelloWorldRequest) Descriptor
deprecated
func (*HelloWorldRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloWorldRequest.ProtoReflect.Descriptor instead.
func (*HelloWorldRequest) GetName ¶
func (x *HelloWorldRequest) GetName() string
func (*HelloWorldRequest) ProtoMessage ¶
func (*HelloWorldRequest) ProtoMessage()
func (*HelloWorldRequest) ProtoReflect ¶
func (x *HelloWorldRequest) ProtoReflect() protoreflect.Message
func (*HelloWorldRequest) Reset ¶
func (x *HelloWorldRequest) Reset()
func (*HelloWorldRequest) String ¶
func (x *HelloWorldRequest) String() string
type HelloWorldResponse ¶
type HelloWorldResponse struct { Answer string `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` // contains filtered or unexported fields }
func (*HelloWorldResponse) Descriptor
deprecated
func (*HelloWorldResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloWorldResponse.ProtoReflect.Descriptor instead.
func (*HelloWorldResponse) GetAnswer ¶
func (x *HelloWorldResponse) GetAnswer() string
func (*HelloWorldResponse) ProtoMessage ¶
func (*HelloWorldResponse) ProtoMessage()
func (*HelloWorldResponse) ProtoReflect ¶
func (x *HelloWorldResponse) ProtoReflect() protoreflect.Message
func (*HelloWorldResponse) Reset ¶
func (x *HelloWorldResponse) Reset()
func (*HelloWorldResponse) String ¶
func (x *HelloWorldResponse) String() string
type MockServiceClient ¶
type MockServiceClient interface {
HelloWorld(ctx context.Context, in *HelloWorldRequest, opts ...grpc.CallOption) (*HelloWorldResponse, error)
}
MockServiceClient is the client API for MockService 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 NewMockServiceClient ¶
func NewMockServiceClient(cc grpc.ClientConnInterface) MockServiceClient
type MockServiceServer ¶
type MockServiceServer interface { HelloWorld(context.Context, *HelloWorldRequest) (*HelloWorldResponse, error) // contains filtered or unexported methods }
MockServiceServer is the server API for MockService service. All implementations must embed UnimplementedMockServiceServer for forward compatibility
type UnimplementedMockServiceServer ¶
type UnimplementedMockServiceServer struct { }
UnimplementedMockServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMockServiceServer) HelloWorld ¶
func (UnimplementedMockServiceServer) HelloWorld(context.Context, *HelloWorldRequest) (*HelloWorldResponse, error)
type UnsafeMockServiceServer ¶
type UnsafeMockServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMockServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MockServiceServer will result in compilation errors.