Documentation
¶
Index ¶
Constants ¶
const (
Test_GetData_FullMethodName = "/testproto.Test/GetData"
)
Variables ¶
var File_api_testproto_test_proto protoreflect.FileDescriptor
var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "testproto.Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetData", Handler: _Test_GetData_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/testproto/test.proto", }
Test_ServiceDesc is the grpc.ServiceDesc for Test service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTestServer ¶
func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
Types ¶
type Input ¶
type Input struct { A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` // contains filtered or unexported fields }
func (*Input) Descriptor
deprecated
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
func (*Input) ProtoReflect ¶
func (x *Input) ProtoReflect() protoreflect.Message
type Output ¶
type Output struct { B int32 `protobuf:"varint,1,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*Output) Descriptor
deprecated
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type TestClient ¶
type TestClient interface {
GetData(ctx context.Context, in *Input, opts ...grpc.CallOption) (*Output, error)
}
TestClient is the client API for Test 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 NewTestClient ¶
func NewTestClient(cc grpc.ClientConnInterface) TestClient
type TestServer ¶
type TestServer interface { GetData(context.Context, *Input) (*Output, error) // contains filtered or unexported methods }
TestServer is the server API for Test service. All implementations must embed UnimplementedTestServer for forward compatibility.
type UnimplementedTestServer ¶
type UnimplementedTestServer struct{}
UnimplementedTestServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeTestServer ¶
type UnsafeTestServer interface {
// contains filtered or unexported methods
}
UnsafeTestServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestServer will result in compilation errors.