Documentation ¶
Index ¶
- Variables
- func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
- type ChatRequest
- func (*ChatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChatRequest) GetChatId() string
- func (x *ChatRequest) GetUserId() string
- func (x *ChatRequest) GetUserMessage() string
- func (*ChatRequest) ProtoMessage()
- func (x *ChatRequest) ProtoReflect() protoreflect.Message
- func (x *ChatRequest) Reset()
- func (x *ChatRequest) String() string
- type ChatResponse
- func (*ChatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ChatResponse) GetChatId() string
- func (x *ChatResponse) GetContent() string
- func (x *ChatResponse) GetUserId() string
- func (*ChatResponse) ProtoMessage()
- func (x *ChatResponse) ProtoReflect() protoreflect.Message
- func (x *ChatResponse) Reset()
- func (x *ChatResponse) String() string
- type ChatServiceClient
- type ChatServiceServer
- type ChatService_ChatStreamClient
- type ChatService_ChatStreamServer
- type UnimplementedChatServiceServer
- type UnsafeChatServiceServer
Constants ¶
This section is empty.
Variables ¶
var ChatService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.ChatService", HandlerType: (*ChatServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ChatStream", Handler: _ChatService_ChatStream_Handler, ServerStreams: true, }, }, Metadata: "proto/chat.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_chat_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
Types ¶
type ChatRequest ¶
type ChatRequest struct { ChatId *string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3,oneof" json:"chat_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` UserMessage string `protobuf:"bytes,3,opt,name=user_message,json=userMessage,proto3" json:"user_message,omitempty"` // contains filtered or unexported fields }
func (*ChatRequest) Descriptor
deprecated
func (*ChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.
func (*ChatRequest) GetChatId ¶
func (x *ChatRequest) GetChatId() string
func (*ChatRequest) GetUserId ¶
func (x *ChatRequest) GetUserId() string
func (*ChatRequest) GetUserMessage ¶
func (x *ChatRequest) GetUserMessage() string
func (*ChatRequest) ProtoMessage ¶
func (*ChatRequest) ProtoMessage()
func (*ChatRequest) ProtoReflect ¶
func (x *ChatRequest) ProtoReflect() protoreflect.Message
func (*ChatRequest) Reset ¶
func (x *ChatRequest) Reset()
func (*ChatRequest) String ¶
func (x *ChatRequest) String() string
type ChatResponse ¶
type ChatResponse struct { ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*ChatResponse) Descriptor
deprecated
func (*ChatResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.
func (*ChatResponse) GetChatId ¶
func (x *ChatResponse) GetChatId() string
func (*ChatResponse) GetContent ¶
func (x *ChatResponse) GetContent() string
func (*ChatResponse) GetUserId ¶
func (x *ChatResponse) GetUserId() string
func (*ChatResponse) ProtoMessage ¶
func (*ChatResponse) ProtoMessage()
func (*ChatResponse) ProtoReflect ¶
func (x *ChatResponse) ProtoReflect() protoreflect.Message
func (*ChatResponse) Reset ¶
func (x *ChatResponse) Reset()
func (*ChatResponse) String ¶
func (x *ChatResponse) String() string
type ChatServiceClient ¶
type ChatServiceClient interface {
ChatStream(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (ChatService_ChatStreamClient, 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 { ChatStream(*ChatRequest, ChatService_ChatStreamServer) error // contains filtered or unexported methods }
ChatServiceServer is the server API for ChatService service. All implementations must embed UnimplementedChatServiceServer for forward compatibility
type ChatService_ChatStreamClient ¶
type ChatService_ChatStreamClient interface { Recv() (*ChatResponse, error) grpc.ClientStream }
type ChatService_ChatStreamServer ¶
type ChatService_ChatStreamServer interface { Send(*ChatResponse) error grpc.ServerStream }
type UnimplementedChatServiceServer ¶
type UnimplementedChatServiceServer struct { }
UnimplementedChatServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedChatServiceServer) ChatStream ¶
func (UnimplementedChatServiceServer) ChatStream(*ChatRequest, ChatService_ChatStreamServer) 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.