Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ChatService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tutorialproto.ChatService", HandlerType: (*ChatServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestHello", Handler: _ChatService_TestHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/hello.proto", }
ChatService_ServiceDesc is the grpc.ServiceDesc for ChatService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_hello_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
Types ¶
type ChatServiceClient ¶
type ChatServiceClient interface {
TestHello(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error)
}
ChatServiceClient is the client API for ChatService 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 NewChatServiceClient ¶
func NewChatServiceClient(cc grpc.ClientConnInterface) ChatServiceClient
type ChatServiceServer ¶
type ChatServiceServer interface { TestHello(context.Context, *MessageReq) (*MessageResp, error) // contains filtered or unexported methods }
ChatServiceServer is the server API for ChatService service. All implementations must embed UnimplementedChatServiceServer for forward compatibility
type MessageReq ¶
type MessageReq struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*MessageReq) Descriptor
deprecated
func (*MessageReq) Descriptor() ([]byte, []int)
Deprecated: Use MessageReq.ProtoReflect.Descriptor instead.
func (*MessageReq) GetBody ¶
func (x *MessageReq) GetBody() string
func (*MessageReq) ProtoMessage ¶
func (*MessageReq) ProtoMessage()
func (*MessageReq) ProtoReflect ¶
func (x *MessageReq) ProtoReflect() protoreflect.Message
func (*MessageReq) Reset ¶
func (x *MessageReq) Reset()
func (*MessageReq) String ¶
func (x *MessageReq) String() string
type MessageResp ¶
type MessageResp struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*MessageResp) Descriptor
deprecated
func (*MessageResp) Descriptor() ([]byte, []int)
Deprecated: Use MessageResp.ProtoReflect.Descriptor instead.
func (*MessageResp) GetBody ¶
func (x *MessageResp) GetBody() string
func (*MessageResp) ProtoMessage ¶
func (*MessageResp) ProtoMessage()
func (*MessageResp) ProtoReflect ¶
func (x *MessageResp) ProtoReflect() protoreflect.Message
func (*MessageResp) Reset ¶
func (x *MessageResp) Reset()
func (*MessageResp) String ¶
func (x *MessageResp) String() string
type UnimplementedChatServiceServer ¶
type UnimplementedChatServiceServer struct { }
UnimplementedChatServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedChatServiceServer) TestHello ¶
func (UnimplementedChatServiceServer) TestHello(context.Context, *MessageReq) (*MessageResp, error)
type UnsafeChatServiceServer ¶
type UnsafeChatServiceServer interface {
// contains filtered or unexported methods
}
UnsafeChatServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatServiceServer will result in compilation errors.