Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterTestHandler(s server.Server, hdlr TestHandler, opts ...server.HandlerOption) error
- func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
- type Request
- type Response
- type TestClient
- type TestHandler
- type TestServer
- type TestService
- type UnimplementedTestServer
- type UnsafeTestServer
Constants ¶
const ( Test_Call_FullMethodName = "/Test/Call" Test_CallPcre_FullMethodName = "/Test/CallPcre" Test_CallPcreInvalid_FullMethodName = "/Test/CallPcreInvalid" )
Variables ¶
var File_proto_test_proto protoreflect.FileDescriptor
var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Call", Handler: _Test_Call_Handler, }, { MethodName: "CallPcre", Handler: _Test_CallPcre_Handler, }, { MethodName: "CallPcreInvalid", Handler: _Test_CallPcreInvalid_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/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 RegisterTestHandler ¶
func RegisterTestHandler(s server.Server, hdlr TestHandler, opts ...server.HandlerOption) error
func RegisterTestServer ¶
func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
Types ¶
type Request ¶
type Request struct {
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type TestClient ¶
type TestClient interface {
Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
CallPcre(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
CallPcreInvalid(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, 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 TestHandler ¶
type TestServer ¶
type TestServer interface {
Call(context.Context, *Request) (*Response, error)
CallPcre(context.Context, *Request) (*Response, error)
CallPcreInvalid(context.Context, *Request) (*Response, error)
// contains filtered or unexported methods
}
TestServer is the server API for Test service. All implementations must embed UnimplementedTestServer for forward compatibility.
type TestService ¶
type TestService interface {
Call(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
CallPcre(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
CallPcreInvalid(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
}
func NewTestService ¶
func NewTestService(name string, c client.Client) TestService
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.
func (UnimplementedTestServer) CallPcreInvalid ¶
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.