fix join response

This commit is contained in:
Asim Aslam
2022-02-17 16:41:35 +00:00
parent c49ee7e8b1
commit 2bb2bcc4b4
5 changed files with 220 additions and 151 deletions

View File

@@ -122,7 +122,7 @@
"user_id": "user-2" "user_id": "user-2"
}, },
"response": { "response": {
"messages": [{ "message": {
"id": "d44c6dc0-89d7-4a36-b528-cfd6c728ccef", "id": "d44c6dc0-89d7-4a36-b528-cfd6c728ccef",
"client": "web", "client": "web",
"room_id": "d8057208-f81a-4e14-ad7f-c29daa2bb910", "room_id": "d8057208-f81a-4e14-ad7f-c29daa2bb910",
@@ -130,7 +130,7 @@
"sent_at": "2022-02-17T16:18:35.683008885Z", "sent_at": "2022-02-17T16:18:35.683008885Z",
"subject": "Random", "subject": "Random",
"text": "Hey whats up?" "text": "Hey whats up?"
}] }
} }
}], }],
"kick": [{ "kick": [{

View File

@@ -403,7 +403,7 @@ func (c *Chat) Join(ctx context.Context, req *pb.JoinRequest, stream pb.Chat_Joi
} }
// publish the message to the stream // publish the message to the stream
if err := stream.Send(&msg); err != nil { if err := stream.Send(&pb.JoinResponse{Message: &msg}); err != nil {
logger.Errorf("Error sending message to stream. ChatID: %v. Message ID: %v. Error: %v", msg.RoomId, msg.Id, err) logger.Errorf("Error sending message to stream. ChatID: %v. Message ID: %v. Error: %v", msg.RoomId, msg.Id, err)
errChan <- err errChan <- err
return nil return nil

View File

@@ -626,6 +626,53 @@ func (x *JoinRequest) GetUserId() string {
return "" return ""
} }
type JoinResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *JoinResponse) Reset() {
*x = JoinResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *JoinResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JoinResponse) ProtoMessage() {}
func (x *JoinResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use JoinResponse.ProtoReflect.Descriptor instead.
func (*JoinResponse) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{11}
}
func (x *JoinResponse) GetMessage() *Message {
if x != nil {
return x.Message
}
return nil
}
type Room struct { type Room struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -648,7 +695,7 @@ type Room struct {
func (x *Room) Reset() { func (x *Room) Reset() {
*x = Room{} *x = Room{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[11] mi := &file_proto_chat_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -661,7 +708,7 @@ func (x *Room) String() string {
func (*Room) ProtoMessage() {} func (*Room) ProtoMessage() {}
func (x *Room) ProtoReflect() protoreflect.Message { func (x *Room) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[11] mi := &file_proto_chat_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -674,7 +721,7 @@ func (x *Room) ProtoReflect() protoreflect.Message {
// Deprecated: Use Room.ProtoReflect.Descriptor instead. // Deprecated: Use Room.ProtoReflect.Descriptor instead.
func (*Room) Descriptor() ([]byte, []int) { func (*Room) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{11} return file_proto_chat_proto_rawDescGZIP(), []int{12}
} }
func (x *Room) GetId() string { func (x *Room) GetId() string {
@@ -744,7 +791,7 @@ type Message struct {
func (x *Message) Reset() { func (x *Message) Reset() {
*x = Message{} *x = Message{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[12] mi := &file_proto_chat_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -757,7 +804,7 @@ func (x *Message) String() string {
func (*Message) ProtoMessage() {} func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message { func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[12] mi := &file_proto_chat_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -770,7 +817,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message.ProtoReflect.Descriptor instead. // Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) { func (*Message) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{12} return file_proto_chat_proto_rawDescGZIP(), []int{13}
} }
func (x *Message) GetId() string { func (x *Message) GetId() string {
@@ -837,7 +884,7 @@ type LeaveRequest struct {
func (x *LeaveRequest) Reset() { func (x *LeaveRequest) Reset() {
*x = LeaveRequest{} *x = LeaveRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[13] mi := &file_proto_chat_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -850,7 +897,7 @@ func (x *LeaveRequest) String() string {
func (*LeaveRequest) ProtoMessage() {} func (*LeaveRequest) ProtoMessage() {}
func (x *LeaveRequest) ProtoReflect() protoreflect.Message { func (x *LeaveRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[13] mi := &file_proto_chat_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -863,7 +910,7 @@ func (x *LeaveRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use LeaveRequest.ProtoReflect.Descriptor instead. // Deprecated: Use LeaveRequest.ProtoReflect.Descriptor instead.
func (*LeaveRequest) Descriptor() ([]byte, []int) { func (*LeaveRequest) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{13} return file_proto_chat_proto_rawDescGZIP(), []int{14}
} }
func (x *LeaveRequest) GetRoomId() string { func (x *LeaveRequest) GetRoomId() string {
@@ -891,7 +938,7 @@ type LeaveResponse struct {
func (x *LeaveResponse) Reset() { func (x *LeaveResponse) Reset() {
*x = LeaveResponse{} *x = LeaveResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[14] mi := &file_proto_chat_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -904,7 +951,7 @@ func (x *LeaveResponse) String() string {
func (*LeaveResponse) ProtoMessage() {} func (*LeaveResponse) ProtoMessage() {}
func (x *LeaveResponse) ProtoReflect() protoreflect.Message { func (x *LeaveResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[14] mi := &file_proto_chat_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -917,7 +964,7 @@ func (x *LeaveResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use LeaveResponse.ProtoReflect.Descriptor instead. // Deprecated: Use LeaveResponse.ProtoReflect.Descriptor instead.
func (*LeaveResponse) Descriptor() ([]byte, []int) { func (*LeaveResponse) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{14} return file_proto_chat_proto_rawDescGZIP(), []int{15}
} }
func (x *LeaveResponse) GetRoom() *Room { func (x *LeaveResponse) GetRoom() *Room {
@@ -942,7 +989,7 @@ type InviteRequest struct {
func (x *InviteRequest) Reset() { func (x *InviteRequest) Reset() {
*x = InviteRequest{} *x = InviteRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[15] mi := &file_proto_chat_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -955,7 +1002,7 @@ func (x *InviteRequest) String() string {
func (*InviteRequest) ProtoMessage() {} func (*InviteRequest) ProtoMessage() {}
func (x *InviteRequest) ProtoReflect() protoreflect.Message { func (x *InviteRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[15] mi := &file_proto_chat_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -968,7 +1015,7 @@ func (x *InviteRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use InviteRequest.ProtoReflect.Descriptor instead. // Deprecated: Use InviteRequest.ProtoReflect.Descriptor instead.
func (*InviteRequest) Descriptor() ([]byte, []int) { func (*InviteRequest) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{15} return file_proto_chat_proto_rawDescGZIP(), []int{16}
} }
func (x *InviteRequest) GetRoomId() string { func (x *InviteRequest) GetRoomId() string {
@@ -996,7 +1043,7 @@ type InviteResponse struct {
func (x *InviteResponse) Reset() { func (x *InviteResponse) Reset() {
*x = InviteResponse{} *x = InviteResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[16] mi := &file_proto_chat_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1009,7 +1056,7 @@ func (x *InviteResponse) String() string {
func (*InviteResponse) ProtoMessage() {} func (*InviteResponse) ProtoMessage() {}
func (x *InviteResponse) ProtoReflect() protoreflect.Message { func (x *InviteResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[16] mi := &file_proto_chat_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1022,7 +1069,7 @@ func (x *InviteResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use InviteResponse.ProtoReflect.Descriptor instead. // Deprecated: Use InviteResponse.ProtoReflect.Descriptor instead.
func (*InviteResponse) Descriptor() ([]byte, []int) { func (*InviteResponse) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{16} return file_proto_chat_proto_rawDescGZIP(), []int{17}
} }
func (x *InviteResponse) GetRoom() *Room { func (x *InviteResponse) GetRoom() *Room {
@@ -1047,7 +1094,7 @@ type KickRequest struct {
func (x *KickRequest) Reset() { func (x *KickRequest) Reset() {
*x = KickRequest{} *x = KickRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[17] mi := &file_proto_chat_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1060,7 +1107,7 @@ func (x *KickRequest) String() string {
func (*KickRequest) ProtoMessage() {} func (*KickRequest) ProtoMessage() {}
func (x *KickRequest) ProtoReflect() protoreflect.Message { func (x *KickRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[17] mi := &file_proto_chat_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1073,7 +1120,7 @@ func (x *KickRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use KickRequest.ProtoReflect.Descriptor instead. // Deprecated: Use KickRequest.ProtoReflect.Descriptor instead.
func (*KickRequest) Descriptor() ([]byte, []int) { func (*KickRequest) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{17} return file_proto_chat_proto_rawDescGZIP(), []int{18}
} }
func (x *KickRequest) GetRoomId() string { func (x *KickRequest) GetRoomId() string {
@@ -1101,7 +1148,7 @@ type KickResponse struct {
func (x *KickResponse) Reset() { func (x *KickResponse) Reset() {
*x = KickResponse{} *x = KickResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_proto_chat_proto_msgTypes[18] mi := &file_proto_chat_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -1114,7 +1161,7 @@ func (x *KickResponse) String() string {
func (*KickResponse) ProtoMessage() {} func (*KickResponse) ProtoMessage() {}
func (x *KickResponse) ProtoReflect() protoreflect.Message { func (x *KickResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_chat_proto_msgTypes[18] mi := &file_proto_chat_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -1127,7 +1174,7 @@ func (x *KickResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use KickResponse.ProtoReflect.Descriptor instead. // Deprecated: Use KickResponse.ProtoReflect.Descriptor instead.
func (*KickResponse) Descriptor() ([]byte, []int) { func (*KickResponse) Descriptor() ([]byte, []int) {
return file_proto_chat_proto_rawDescGZIP(), []int{18} return file_proto_chat_proto_rawDescGZIP(), []int{19}
} }
func (x *KickResponse) GetRoom() *Room { func (x *KickResponse) GetRoom() *Room {
@@ -1186,79 +1233,83 @@ var file_proto_chat_proto_rawDesc = []byte{
0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
0x64, 0x22, 0xa0, 0x01, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x64, 0x22, 0x37, 0x0a, 0x0c, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x04, 0x52,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65,
0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
0x76, 0x61, 0x74, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72,
0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x49, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x06,
0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0xaa, 0x01,
0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x69,
0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e,
0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
0x74, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x05,
0x74, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07,
0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x65,
0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f,
0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f,
0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x0d,
0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a,
0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x68,
0x61, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x41, 0x0a,
0x0d, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17,
0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
0x22, 0x30, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f,
0x6f, 0x6d, 0x22, 0x3f, 0x0a, 0x0b, 0x4b, 0x69, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
0x72, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x0d, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0c, 0x4b, 0x69, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72,
0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x41, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x6f, 0x6f, 0x6d, 0x32, 0xc4, 0x03, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x03,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x4e, 0x65, 0x77, 0x12, 0x10, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4e, 0x65, 0x77,
0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x48, 0x69, 0x73, 0x74,
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f,
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74,
0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x3f, 0x0a, 0x0b, 0x4b, 0x69, 0x63, 0x12, 0x2d, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x68,
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x2d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c,
0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0c, 0x4b, 0x69, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x68, 0x61,
0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33,
0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x32, 0xbf, 0x03, 0x0a, 0x04, 0x43, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
0x68, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x03, 0x4e, 0x65, 0x77, 0x12, 0x10, 0x2e, 0x63, 0x68, 0x61, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x74, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x63, 0x68,
0x68, 0x61, 0x74, 0x2e, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12,
0x36, 0x0a, 0x07, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x65, 0x30, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x13,
0x1a, 0x15, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74,
0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x4c, 0x65, 0x61,
0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x76, 0x65, 0x12, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x11, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x65,
0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x4b,
0x74, 0x1a, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x69, 0x63, 0x6b, 0x12, 0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x52,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4b, 0x69,
0x13, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x4a, 0x6f, 0x6f, 0x33,
0x69, 0x6e, 0x12, 0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x30, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65,
0x12, 0x13, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x49, 0x6e, 0x76,
0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x4c,
0x65, 0x61, 0x76, 0x65, 0x12, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x65, 0x61, 0x76,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a,
0x04, 0x4b, 0x69, 0x63, 0x6b, 0x12, 0x11, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4b, 0x69, 0x63,
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
0x4b, 0x69, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x5a, 0x0c,
0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -1273,7 +1324,7 @@ func file_proto_chat_proto_rawDescGZIP() []byte {
return file_proto_chat_proto_rawDescData return file_proto_chat_proto_rawDescData
} }
var file_proto_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_proto_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_proto_chat_proto_goTypes = []interface{}{ var file_proto_chat_proto_goTypes = []interface{}{
(*NewRequest)(nil), // 0: chat.NewRequest (*NewRequest)(nil), // 0: chat.NewRequest
(*NewResponse)(nil), // 1: chat.NewResponse (*NewResponse)(nil), // 1: chat.NewResponse
@@ -1286,47 +1337,49 @@ var file_proto_chat_proto_goTypes = []interface{}{
(*SendRequest)(nil), // 8: chat.SendRequest (*SendRequest)(nil), // 8: chat.SendRequest
(*SendResponse)(nil), // 9: chat.SendResponse (*SendResponse)(nil), // 9: chat.SendResponse
(*JoinRequest)(nil), // 10: chat.JoinRequest (*JoinRequest)(nil), // 10: chat.JoinRequest
(*Room)(nil), // 11: chat.Room (*JoinResponse)(nil), // 11: chat.JoinResponse
(*Message)(nil), // 12: chat.Message (*Room)(nil), // 12: chat.Room
(*LeaveRequest)(nil), // 13: chat.LeaveRequest (*Message)(nil), // 13: chat.Message
(*LeaveResponse)(nil), // 14: chat.LeaveResponse (*LeaveRequest)(nil), // 14: chat.LeaveRequest
(*InviteRequest)(nil), // 15: chat.InviteRequest (*LeaveResponse)(nil), // 15: chat.LeaveResponse
(*InviteResponse)(nil), // 16: chat.InviteResponse (*InviteRequest)(nil), // 16: chat.InviteRequest
(*KickRequest)(nil), // 17: chat.KickRequest (*InviteResponse)(nil), // 17: chat.InviteResponse
(*KickResponse)(nil), // 18: chat.KickResponse (*KickRequest)(nil), // 18: chat.KickRequest
(*KickResponse)(nil), // 19: chat.KickResponse
} }
var file_proto_chat_proto_depIdxs = []int32{ var file_proto_chat_proto_depIdxs = []int32{
11, // 0: chat.NewResponse.room:type_name -> chat.Room 12, // 0: chat.NewResponse.room:type_name -> chat.Room
12, // 1: chat.HistoryResponse.messages:type_name -> chat.Message 13, // 1: chat.HistoryResponse.messages:type_name -> chat.Message
11, // 2: chat.ListResponse.rooms:type_name -> chat.Room 12, // 2: chat.ListResponse.rooms:type_name -> chat.Room
11, // 3: chat.DeleteResponse.room:type_name -> chat.Room 12, // 3: chat.DeleteResponse.room:type_name -> chat.Room
12, // 4: chat.SendResponse.message:type_name -> chat.Message 13, // 4: chat.SendResponse.message:type_name -> chat.Message
11, // 5: chat.LeaveResponse.room:type_name -> chat.Room 13, // 5: chat.JoinResponse.message:type_name -> chat.Message
11, // 6: chat.InviteResponse.room:type_name -> chat.Room 12, // 6: chat.LeaveResponse.room:type_name -> chat.Room
11, // 7: chat.KickResponse.room:type_name -> chat.Room 12, // 7: chat.InviteResponse.room:type_name -> chat.Room
0, // 8: chat.Chat.New:input_type -> chat.NewRequest 12, // 8: chat.KickResponse.room:type_name -> chat.Room
2, // 9: chat.Chat.History:input_type -> chat.HistoryRequest 0, // 9: chat.Chat.New:input_type -> chat.NewRequest
8, // 10: chat.Chat.Send:input_type -> chat.SendRequest 2, // 10: chat.Chat.History:input_type -> chat.HistoryRequest
4, // 11: chat.Chat.List:input_type -> chat.ListRequest 8, // 11: chat.Chat.Send:input_type -> chat.SendRequest
6, // 12: chat.Chat.Delete:input_type -> chat.DeleteRequest 4, // 12: chat.Chat.List:input_type -> chat.ListRequest
10, // 13: chat.Chat.Join:input_type -> chat.JoinRequest 6, // 13: chat.Chat.Delete:input_type -> chat.DeleteRequest
15, // 14: chat.Chat.Invite:input_type -> chat.InviteRequest 10, // 14: chat.Chat.Join:input_type -> chat.JoinRequest
13, // 15: chat.Chat.Leave:input_type -> chat.LeaveRequest 16, // 15: chat.Chat.Invite:input_type -> chat.InviteRequest
17, // 16: chat.Chat.Kick:input_type -> chat.KickRequest 14, // 16: chat.Chat.Leave:input_type -> chat.LeaveRequest
1, // 17: chat.Chat.New:output_type -> chat.NewResponse 18, // 17: chat.Chat.Kick:input_type -> chat.KickRequest
3, // 18: chat.Chat.History:output_type -> chat.HistoryResponse 1, // 18: chat.Chat.New:output_type -> chat.NewResponse
9, // 19: chat.Chat.Send:output_type -> chat.SendResponse 3, // 19: chat.Chat.History:output_type -> chat.HistoryResponse
5, // 20: chat.Chat.List:output_type -> chat.ListResponse 9, // 20: chat.Chat.Send:output_type -> chat.SendResponse
7, // 21: chat.Chat.Delete:output_type -> chat.DeleteResponse 5, // 21: chat.Chat.List:output_type -> chat.ListResponse
12, // 22: chat.Chat.Join:output_type -> chat.Message 7, // 22: chat.Chat.Delete:output_type -> chat.DeleteResponse
16, // 23: chat.Chat.Invite:output_type -> chat.InviteResponse 11, // 23: chat.Chat.Join:output_type -> chat.JoinResponse
14, // 24: chat.Chat.Leave:output_type -> chat.LeaveResponse 17, // 24: chat.Chat.Invite:output_type -> chat.InviteResponse
18, // 25: chat.Chat.Kick:output_type -> chat.KickResponse 15, // 25: chat.Chat.Leave:output_type -> chat.LeaveResponse
17, // [17:26] is the sub-list for method output_type 19, // 26: chat.Chat.Kick:output_type -> chat.KickResponse
8, // [8:17] is the sub-list for method input_type 18, // [18:27] is the sub-list for method output_type
8, // [8:8] is the sub-list for extension type_name 9, // [9:18] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension extendee 9, // [9:9] is the sub-list for extension type_name
0, // [0:8] is the sub-list for field type_name 9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
} }
func init() { file_proto_chat_proto_init() } func init() { file_proto_chat_proto_init() }
@@ -1468,7 +1521,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Room); i { switch v := v.(*JoinResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1480,7 +1533,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Message); i { switch v := v.(*Room); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1492,7 +1545,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LeaveRequest); i { switch v := v.(*Message); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1504,7 +1557,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LeaveResponse); i { switch v := v.(*LeaveRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1516,7 +1569,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InviteRequest); i { switch v := v.(*LeaveResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1528,7 +1581,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InviteResponse); i { switch v := v.(*InviteRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1540,7 +1593,7 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KickRequest); i { switch v := v.(*InviteResponse); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@@ -1552,6 +1605,18 @@ func file_proto_chat_proto_init() {
} }
} }
file_proto_chat_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { file_proto_chat_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KickRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_chat_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KickResponse); i { switch v := v.(*KickResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -1570,7 +1635,7 @@ func file_proto_chat_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_chat_proto_rawDesc, RawDescriptor: file_proto_chat_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 19, NumMessages: 20,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@@ -132,7 +132,7 @@ type Chat_JoinService interface {
SendMsg(interface{}) error SendMsg(interface{}) error
RecvMsg(interface{}) error RecvMsg(interface{}) error
Close() error Close() error
Recv() (*Message, error) Recv() (*JoinResponse, error)
} }
type chatServiceJoin struct { type chatServiceJoin struct {
@@ -155,8 +155,8 @@ func (x *chatServiceJoin) RecvMsg(m interface{}) error {
return x.stream.Recv(m) return x.stream.Recv(m)
} }
func (x *chatServiceJoin) Recv() (*Message, error) { func (x *chatServiceJoin) Recv() (*JoinResponse, error) {
m := new(Message) m := new(JoinResponse)
err := x.stream.Recv(m) err := x.stream.Recv(m)
if err != nil { if err != nil {
return nil, err return nil, err
@@ -264,7 +264,7 @@ type Chat_JoinStream interface {
SendMsg(interface{}) error SendMsg(interface{}) error
RecvMsg(interface{}) error RecvMsg(interface{}) error
Close() error Close() error
Send(*Message) error Send(*JoinResponse) error
} }
type chatJoinStream struct { type chatJoinStream struct {
@@ -287,7 +287,7 @@ func (x *chatJoinStream) RecvMsg(m interface{}) error {
return x.stream.Recv(m) return x.stream.Recv(m)
} }
func (x *chatJoinStream) Send(m *Message) error { func (x *chatJoinStream) Send(m *JoinResponse) error {
return x.stream.Send(m) return x.stream.Send(m)
} }

View File

@@ -9,7 +9,7 @@ service Chat {
rpc Send(SendRequest) returns (SendResponse); rpc Send(SendRequest) returns (SendResponse);
rpc List(ListRequest) returns (ListResponse); rpc List(ListRequest) returns (ListResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Join(JoinRequest) returns (stream Message); rpc Join(JoinRequest) returns (stream JoinResponse);
rpc Invite(InviteRequest) returns (InviteResponse); rpc Invite(InviteRequest) returns (InviteResponse);
rpc Leave(LeaveRequest) returns (LeaveResponse); rpc Leave(LeaveRequest) returns (LeaveResponse);
rpc Kick(KickRequest) returns (KickResponse); rpc Kick(KickRequest) returns (KickResponse);
@@ -93,6 +93,10 @@ message JoinRequest {
string user_id = 2; string user_id = 2;
} }
message JoinResponse {
Message message = 1;
}
message Room { message Room {
// unique room id // unique room id
string id = 1; string id = 1;