Documentation ¶
Index ¶
- Variables
- func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
- type ChatServiceClient
- type ChatServiceServer
- type GetChatReq
- func (*GetChatReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetChatReq) GetRecieverId() string
- func (x *GetChatReq) GetSenderId() string
- func (*GetChatReq) ProtoMessage()
- func (x *GetChatReq) ProtoReflect() protoreflect.Message
- func (x *GetChatReq) Reset()
- func (x *GetChatReq) String() string
- type GetChatRes
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetContent() string
- func (x *Message) GetMessageID() string
- func (x *Message) GetRecipientId() string
- func (x *Message) GetSenderId() string
- func (x *Message) GetStatus() string
- func (x *Message) GetTag() string
- func (x *Message) GetTimestamp() string
- func (x *Message) GetType() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type UnimplementedChatServiceServer
- type UnsafeChatServiceServer
Constants ¶
This section is empty.
Variables ¶
var ChatService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chat.ChatService", HandlerType: (*ChatServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetChats", Handler: _ChatService_GetChats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/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_pb_chat_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
Types ¶
type ChatServiceClient ¶
type ChatServiceClient interface {
GetChats(ctx context.Context, in *GetChatReq, opts ...grpc.CallOption) (*GetChatRes, 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 { GetChats(context.Context, *GetChatReq) (*GetChatRes, error) // contains filtered or unexported methods }
ChatServiceServer is the server API for ChatService service. All implementations must embed UnimplementedChatServiceServer for forward compatibility
type GetChatReq ¶
type GetChatReq struct { SenderId string `protobuf:"bytes,1,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` RecieverId string `protobuf:"bytes,2,opt,name=reciever_id,json=recieverId,proto3" json:"reciever_id,omitempty"` // contains filtered or unexported fields }
func (*GetChatReq) Descriptor
deprecated
func (*GetChatReq) Descriptor() ([]byte, []int)
Deprecated: Use GetChatReq.ProtoReflect.Descriptor instead.
func (*GetChatReq) GetRecieverId ¶
func (x *GetChatReq) GetRecieverId() string
func (*GetChatReq) GetSenderId ¶
func (x *GetChatReq) GetSenderId() string
func (*GetChatReq) ProtoMessage ¶
func (*GetChatReq) ProtoMessage()
func (*GetChatReq) ProtoReflect ¶
func (x *GetChatReq) ProtoReflect() protoreflect.Message
func (*GetChatReq) Reset ¶
func (x *GetChatReq) Reset()
func (*GetChatReq) String ¶
func (x *GetChatReq) String() string
type GetChatRes ¶
type GetChatRes struct { Chat []*Message `protobuf:"bytes,1,rep,name=Chat,proto3" json:"Chat,omitempty"` // contains filtered or unexported fields }
func (*GetChatRes) Descriptor
deprecated
func (*GetChatRes) Descriptor() ([]byte, []int)
Deprecated: Use GetChatRes.ProtoReflect.Descriptor instead.
func (*GetChatRes) GetChat ¶
func (x *GetChatRes) GetChat() []*Message
func (*GetChatRes) ProtoMessage ¶
func (*GetChatRes) ProtoMessage()
func (*GetChatRes) ProtoReflect ¶
func (x *GetChatRes) ProtoReflect() protoreflect.Message
func (*GetChatRes) Reset ¶
func (x *GetChatRes) Reset()
func (*GetChatRes) String ¶
func (x *GetChatRes) String() string
type Message ¶
type Message struct { MessageID string `protobuf:"bytes,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` SenderId string `protobuf:"bytes,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"` RecipientId string `protobuf:"bytes,3,opt,name=recipient_id,json=recipientId,proto3" json:"recipient_id,omitempty"` Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` Timestamp string `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` Tag string `protobuf:"bytes,7,opt,name=tag,proto3" json:"tag,omitempty"` Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetContent ¶
func (*Message) GetMessageID ¶
func (*Message) GetRecipientId ¶
func (*Message) GetSenderId ¶
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type UnimplementedChatServiceServer ¶
type UnimplementedChatServiceServer struct { }
UnimplementedChatServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedChatServiceServer) GetChats ¶
func (UnimplementedChatServiceServer) GetChats(context.Context, *GetChatReq) (*GetChatRes, 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.