|
@@ -2,7 +2,7 @@
|
|
|
// versions:
|
|
|
// protoc-gen-go v1.36.6
|
|
|
// protoc v3.15.1
|
|
|
-// source: proto/chat.proto
|
|
|
+// source: chat.proto
|
|
|
|
|
|
package chat
|
|
|
|
|
@@ -29,7 +29,7 @@ type PingRequest struct {
|
|
|
|
|
|
func (x *PingRequest) Reset() {
|
|
|
*x = PingRequest{}
|
|
|
- mi := &file_proto_chat_proto_msgTypes[0]
|
|
|
+ mi := &file_chat_proto_msgTypes[0]
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
}
|
|
@@ -41,7 +41,7 @@ func (x *PingRequest) String() string {
|
|
|
func (*PingRequest) ProtoMessage() {}
|
|
|
|
|
|
func (x *PingRequest) ProtoReflect() protoreflect.Message {
|
|
|
- mi := &file_proto_chat_proto_msgTypes[0]
|
|
|
+ mi := &file_chat_proto_msgTypes[0]
|
|
|
if x != nil {
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
@@ -54,19 +54,20 @@ func (x *PingRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
|
|
|
func (*PingRequest) Descriptor() ([]byte, []int) {
|
|
|
- return file_proto_chat_proto_rawDescGZIP(), []int{0}
|
|
|
+ return file_chat_proto_rawDescGZIP(), []int{0}
|
|
|
}
|
|
|
|
|
|
type PingResponse struct {
|
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
|
- Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 可以返回服务器状态
|
|
|
+ Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
|
|
|
+ Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
}
|
|
|
|
|
|
func (x *PingResponse) Reset() {
|
|
|
*x = PingResponse{}
|
|
|
- mi := &file_proto_chat_proto_msgTypes[1]
|
|
|
+ mi := &file_chat_proto_msgTypes[1]
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
}
|
|
@@ -78,7 +79,7 @@ func (x *PingResponse) String() string {
|
|
|
func (*PingResponse) ProtoMessage() {}
|
|
|
|
|
|
func (x *PingResponse) ProtoReflect() protoreflect.Message {
|
|
|
- mi := &file_proto_chat_proto_msgTypes[1]
|
|
|
+ mi := &file_chat_proto_msgTypes[1]
|
|
|
if x != nil {
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
@@ -91,7 +92,7 @@ func (x *PingResponse) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
|
|
|
func (*PingResponse) Descriptor() ([]byte, []int) {
|
|
|
- return file_proto_chat_proto_rawDescGZIP(), []int{1}
|
|
|
+ return file_chat_proto_rawDescGZIP(), []int{1}
|
|
|
}
|
|
|
|
|
|
func (x *PingResponse) GetStatus() string {
|
|
@@ -101,6 +102,13 @@ func (x *PingResponse) GetStatus() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
+func (x *PingResponse) GetTimestamp() int64 {
|
|
|
+ if x != nil {
|
|
|
+ return x.Timestamp
|
|
|
+ }
|
|
|
+ return 0
|
|
|
+}
|
|
|
+
|
|
|
type JoinRequest struct {
|
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
@@ -111,7 +119,7 @@ type JoinRequest struct {
|
|
|
|
|
|
func (x *JoinRequest) Reset() {
|
|
|
*x = JoinRequest{}
|
|
|
- mi := &file_proto_chat_proto_msgTypes[2]
|
|
|
+ mi := &file_chat_proto_msgTypes[2]
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
}
|
|
@@ -123,7 +131,7 @@ func (x *JoinRequest) String() string {
|
|
|
func (*JoinRequest) ProtoMessage() {}
|
|
|
|
|
|
func (x *JoinRequest) ProtoReflect() protoreflect.Message {
|
|
|
- mi := &file_proto_chat_proto_msgTypes[2]
|
|
|
+ mi := &file_chat_proto_msgTypes[2]
|
|
|
if x != nil {
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
@@ -136,7 +144,7 @@ func (x *JoinRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
// Deprecated: Use JoinRequest.ProtoReflect.Descriptor instead.
|
|
|
func (*JoinRequest) Descriptor() ([]byte, []int) {
|
|
|
- return file_proto_chat_proto_rawDescGZIP(), []int{2}
|
|
|
+ return file_chat_proto_rawDescGZIP(), []int{2}
|
|
|
}
|
|
|
|
|
|
func (x *JoinRequest) GetUserId() string {
|
|
@@ -165,7 +173,7 @@ type Message struct {
|
|
|
|
|
|
func (x *Message) Reset() {
|
|
|
*x = Message{}
|
|
|
- mi := &file_proto_chat_proto_msgTypes[3]
|
|
|
+ mi := &file_chat_proto_msgTypes[3]
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
}
|
|
@@ -177,7 +185,7 @@ func (x *Message) String() string {
|
|
|
func (*Message) ProtoMessage() {}
|
|
|
|
|
|
func (x *Message) ProtoReflect() protoreflect.Message {
|
|
|
- mi := &file_proto_chat_proto_msgTypes[3]
|
|
|
+ mi := &file_chat_proto_msgTypes[3]
|
|
|
if x != nil {
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
@@ -190,7 +198,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
|
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
|
- return file_proto_chat_proto_rawDescGZIP(), []int{3}
|
|
|
+ return file_chat_proto_rawDescGZIP(), []int{3}
|
|
|
}
|
|
|
|
|
|
func (x *Message) GetUserId() string {
|
|
@@ -231,7 +239,7 @@ type MessageAck struct {
|
|
|
|
|
|
func (x *MessageAck) Reset() {
|
|
|
*x = MessageAck{}
|
|
|
- mi := &file_proto_chat_proto_msgTypes[4]
|
|
|
+ mi := &file_chat_proto_msgTypes[4]
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
}
|
|
@@ -243,7 +251,7 @@ func (x *MessageAck) String() string {
|
|
|
func (*MessageAck) ProtoMessage() {}
|
|
|
|
|
|
func (x *MessageAck) ProtoReflect() protoreflect.Message {
|
|
|
- mi := &file_proto_chat_proto_msgTypes[4]
|
|
|
+ mi := &file_chat_proto_msgTypes[4]
|
|
|
if x != nil {
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
@@ -256,7 +264,7 @@ func (x *MessageAck) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
// Deprecated: Use MessageAck.ProtoReflect.Descriptor instead.
|
|
|
func (*MessageAck) Descriptor() ([]byte, []int) {
|
|
|
- return file_proto_chat_proto_rawDescGZIP(), []int{4}
|
|
|
+ return file_chat_proto_rawDescGZIP(), []int{4}
|
|
|
}
|
|
|
|
|
|
func (x *MessageAck) GetSuccess() bool {
|
|
@@ -273,14 +281,16 @@ func (x *MessageAck) GetMessageId() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
-var File_proto_chat_proto protoreflect.FileDescriptor
|
|
|
+var File_chat_proto protoreflect.FileDescriptor
|
|
|
|
|
|
-const file_proto_chat_proto_rawDesc = "" +
|
|
|
+const file_chat_proto_rawDesc = "" +
|
|
|
+ "\n" +
|
|
|
"\n" +
|
|
|
- "\x10proto/chat.proto\x12\x04chat\"\r\n" +
|
|
|
- "\vPingRequest\"&\n" +
|
|
|
+ "chat.proto\x12\x04chat\"\r\n" +
|
|
|
+ "\vPingRequest\"D\n" +
|
|
|
"\fPingResponse\x12\x16\n" +
|
|
|
- "\x06status\x18\x01 \x01(\tR\x06status\"<\n" +
|
|
|
+ "\x06status\x18\x01 \x01(\tR\x06status\x12\x1c\n" +
|
|
|
+ "\ttimestamp\x18\x02 \x01(\x03R\ttimestamp\"<\n" +
|
|
|
"\vJoinRequest\x12\x17\n" +
|
|
|
"\auser_id\x18\x01 \x01(\tR\x06userId\x12\x14\n" +
|
|
|
"\x05force\x18\x02 \x01(\bR\x05force\"l\n" +
|
|
@@ -297,29 +307,29 @@ const file_proto_chat_proto_rawDesc = "" +
|
|
|
"\vChatService\x12.\n" +
|
|
|
"\bJoinChat\x12\x11.chat.JoinRequest\x1a\r.chat.Message0\x01\x12.\n" +
|
|
|
"\vSendMessage\x12\r.chat.Message\x1a\x10.chat.MessageAck\x12-\n" +
|
|
|
- "\x04Ping\x12\x11.chat.PingRequest\x1a\x12.chat.PingResponseB\rZ\v./chat;chatb\x06proto3"
|
|
|
+ "\x04Ping\x12\x11.chat.PingRequest\x1a\x12.chat.PingResponseB\x0eZ\f../chat;chatb\x06proto3"
|
|
|
|
|
|
var (
|
|
|
- file_proto_chat_proto_rawDescOnce sync.Once
|
|
|
- file_proto_chat_proto_rawDescData []byte
|
|
|
+ file_chat_proto_rawDescOnce sync.Once
|
|
|
+ file_chat_proto_rawDescData []byte
|
|
|
)
|
|
|
|
|
|
-func file_proto_chat_proto_rawDescGZIP() []byte {
|
|
|
- file_proto_chat_proto_rawDescOnce.Do(func() {
|
|
|
- file_proto_chat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_chat_proto_rawDesc), len(file_proto_chat_proto_rawDesc)))
|
|
|
+func file_chat_proto_rawDescGZIP() []byte {
|
|
|
+ file_chat_proto_rawDescOnce.Do(func() {
|
|
|
+ file_chat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_chat_proto_rawDesc), len(file_chat_proto_rawDesc)))
|
|
|
})
|
|
|
- return file_proto_chat_proto_rawDescData
|
|
|
+ return file_chat_proto_rawDescData
|
|
|
}
|
|
|
|
|
|
-var file_proto_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
|
-var file_proto_chat_proto_goTypes = []any{
|
|
|
+var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
|
+var file_chat_proto_goTypes = []any{
|
|
|
(*PingRequest)(nil), // 0: chat.PingRequest
|
|
|
(*PingResponse)(nil), // 1: chat.PingResponse
|
|
|
(*JoinRequest)(nil), // 2: chat.JoinRequest
|
|
|
(*Message)(nil), // 3: chat.Message
|
|
|
(*MessageAck)(nil), // 4: chat.MessageAck
|
|
|
}
|
|
|
-var file_proto_chat_proto_depIdxs = []int32{
|
|
|
+var file_chat_proto_depIdxs = []int32{
|
|
|
2, // 0: chat.ChatService.JoinChat:input_type -> chat.JoinRequest
|
|
|
3, // 1: chat.ChatService.SendMessage:input_type -> chat.Message
|
|
|
0, // 2: chat.ChatService.Ping:input_type -> chat.PingRequest
|
|
@@ -333,26 +343,26 @@ var file_proto_chat_proto_depIdxs = []int32{
|
|
|
0, // [0:0] is the sub-list for field type_name
|
|
|
}
|
|
|
|
|
|
-func init() { file_proto_chat_proto_init() }
|
|
|
-func file_proto_chat_proto_init() {
|
|
|
- if File_proto_chat_proto != nil {
|
|
|
+func init() { file_chat_proto_init() }
|
|
|
+func file_chat_proto_init() {
|
|
|
+ if File_chat_proto != nil {
|
|
|
return
|
|
|
}
|
|
|
type x struct{}
|
|
|
out := protoimpl.TypeBuilder{
|
|
|
File: protoimpl.DescBuilder{
|
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
|
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_chat_proto_rawDesc), len(file_proto_chat_proto_rawDesc)),
|
|
|
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_chat_proto_rawDesc), len(file_chat_proto_rawDesc)),
|
|
|
NumEnums: 0,
|
|
|
NumMessages: 5,
|
|
|
NumExtensions: 0,
|
|
|
NumServices: 1,
|
|
|
},
|
|
|
- GoTypes: file_proto_chat_proto_goTypes,
|
|
|
- DependencyIndexes: file_proto_chat_proto_depIdxs,
|
|
|
- MessageInfos: file_proto_chat_proto_msgTypes,
|
|
|
+ GoTypes: file_chat_proto_goTypes,
|
|
|
+ DependencyIndexes: file_chat_proto_depIdxs,
|
|
|
+ MessageInfos: file_chat_proto_msgTypes,
|
|
|
}.Build()
|
|
|
- File_proto_chat_proto = out.File
|
|
|
- file_proto_chat_proto_goTypes = nil
|
|
|
- file_proto_chat_proto_depIdxs = nil
|
|
|
+ File_chat_proto = out.File
|
|
|
+ file_chat_proto_goTypes = nil
|
|
|
+ file_chat_proto_depIdxs = nil
|
|
|
}
|