From a402f4150b8567d358e096385081f053d43d7281 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Mon, 19 Jun 2023 18:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=BB=E5=8A=A1=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/buried_db.pb.go | 6 ++-- pb/notify_db.pb.go | 55 ++++++++++++++++++++++++++++++-- pb/notify_msg.pb.go | 77 ++++++++++++++++++++++++++++++++++++++------- 3 files changed, 120 insertions(+), 18 deletions(-) diff --git a/pb/buried_db.pb.go b/pb/buried_db.pb.go index 5d3c26e6f..cd0777672 100644 --- a/pb/buried_db.pb.go +++ b/pb/buried_db.pb.go @@ -269,9 +269,9 @@ type DBBuried struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - Items map[int32]*DBBuriedItem `protobuf:"bytes,4,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3" bson:"burieds"` //埋点数据 key条件id + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //唯一ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + Items map[int32]*DBBuriedItem `protobuf:"bytes,4,rep,name=items,proto3" json:"items" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //埋点数据 key条件id } func (x *DBBuried) Reset() { diff --git a/pb/notify_db.pb.go b/pb/notify_db.pb.go index 5c24edd17..e0526d67a 100644 --- a/pb/notify_db.pb.go +++ b/pb/notify_db.pb.go @@ -20,6 +20,50 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +//通知 +type NotifyEvent int32 + +const ( + NotifyEvent_Notify_1001 NotifyEvent = 0 +) + +// Enum value maps for NotifyEvent. +var ( + NotifyEvent_name = map[int32]string{ + 0: "Notify_1001", + } + NotifyEvent_value = map[string]int32{ + "Notify_1001": 0, + } +) + +func (x NotifyEvent) Enum() *NotifyEvent { + p := new(NotifyEvent) + *p = x + return p +} + +func (x NotifyEvent) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NotifyEvent) Descriptor() protoreflect.EnumDescriptor { + return file_notify_notify_db_proto_enumTypes[0].Descriptor() +} + +func (NotifyEvent) Type() protoreflect.EnumType { + return &file_notify_notify_db_proto_enumTypes[0] +} + +func (x NotifyEvent) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NotifyEvent.Descriptor instead. +func (NotifyEvent) EnumDescriptor() ([]byte, []int) { + return file_notify_notify_db_proto_rawDescGZIP(), []int{0} +} + //系统公告数据结构 type DBSystemNotify struct { state protoimpl.MessageState @@ -121,7 +165,9 @@ var file_notify_notify_db_proto_rawDesc = []byte{ 0x73, 0x74, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x1e, 0x0a, + 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0f, 0x0a, 0x0b, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x31, 0x30, 0x30, 0x31, 0x10, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -137,9 +183,11 @@ func file_notify_notify_db_proto_rawDescGZIP() []byte { return file_notify_notify_db_proto_rawDescData } +var file_notify_notify_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_notify_notify_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_notify_notify_db_proto_goTypes = []interface{}{ - (*DBSystemNotify)(nil), // 0: DBSystemNotify + (NotifyEvent)(0), // 0: NotifyEvent + (*DBSystemNotify)(nil), // 1: DBSystemNotify } var file_notify_notify_db_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -173,13 +221,14 @@ func file_notify_notify_db_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_notify_notify_db_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_notify_notify_db_proto_goTypes, DependencyIndexes: file_notify_notify_db_proto_depIdxs, + EnumInfos: file_notify_notify_db_proto_enumTypes, MessageInfos: file_notify_notify_db_proto_msgTypes, }.Build() File_notify_notify_db_proto = out.File diff --git a/pb/notify_msg.pb.go b/pb/notify_msg.pb.go index 2b0edaa39..d90eb0c1f 100644 --- a/pb/notify_msg.pb.go +++ b/pb/notify_msg.pb.go @@ -205,6 +205,45 @@ func (x *NotifyGetListResp) GetSysNotify() []*DBSystemNotify { return nil } +//通知事件推送 +type NotifyEventPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NotifyEventPush) Reset() { + *x = NotifyEventPush{} + if protoimpl.UnsafeEnabled { + mi := &file_notify_notify_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotifyEventPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyEventPush) ProtoMessage() {} + +func (x *NotifyEventPush) ProtoReflect() protoreflect.Message { + mi := &file_notify_notify_msg_proto_msgTypes[3] + 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 NotifyEventPush.ProtoReflect.Descriptor instead. +func (*NotifyEventPush) Descriptor() ([]byte, []int) { + return file_notify_notify_msg_proto_rawDescGZIP(), []int{3} +} + var File_notify_notify_msg_proto protoreflect.FileDescriptor var file_notify_notify_msg_proto_rawDesc = []byte{ @@ -235,8 +274,9 @@ var file_notify_notify_msg_proto_rawDesc = []byte{ 0x52, 0x0c, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x53, 0x79, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x79, 0x52, 0x09, 0x53, 0x79, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x66, 0x79, 0x52, 0x09, 0x53, 0x79, 0x73, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x22, 0x11, 0x0a, + 0x0f, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x75, 0x73, 0x68, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -251,21 +291,22 @@ func file_notify_notify_msg_proto_rawDescGZIP() []byte { return file_notify_notify_msg_proto_rawDescData } -var file_notify_notify_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_notify_notify_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_notify_notify_msg_proto_goTypes = []interface{}{ (*NotifyErrorNotifyPush)(nil), // 0: NotifyErrorNotifyPush (*NotifyGetListReq)(nil), // 1: NotifyGetListReq (*NotifyGetListResp)(nil), // 2: NotifyGetListResp - (ErrorCode)(0), // 3: ErrorCode - (*anypb.Any)(nil), // 4: google.protobuf.Any - (*ErrorData)(nil), // 5: ErrorData - (*DBSystemNotify)(nil), // 6: DBSystemNotify + (*NotifyEventPush)(nil), // 3: NotifyEventPush + (ErrorCode)(0), // 4: ErrorCode + (*anypb.Any)(nil), // 5: google.protobuf.Any + (*ErrorData)(nil), // 6: ErrorData + (*DBSystemNotify)(nil), // 7: DBSystemNotify } var file_notify_notify_msg_proto_depIdxs = []int32{ - 3, // 0: NotifyErrorNotifyPush.Code:type_name -> ErrorCode - 4, // 1: NotifyErrorNotifyPush.arg:type_name -> google.protobuf.Any - 5, // 2: NotifyErrorNotifyPush.err:type_name -> ErrorData - 6, // 3: NotifyGetListResp.SysNotify:type_name -> DBSystemNotify + 4, // 0: NotifyErrorNotifyPush.Code:type_name -> ErrorCode + 5, // 1: NotifyErrorNotifyPush.arg:type_name -> google.protobuf.Any + 6, // 2: NotifyErrorNotifyPush.err:type_name -> ErrorData + 7, // 3: NotifyGetListResp.SysNotify:type_name -> DBSystemNotify 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -318,6 +359,18 @@ func file_notify_notify_msg_proto_init() { return nil } } + file_notify_notify_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NotifyEventPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -325,7 +378,7 @@ func file_notify_notify_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_notify_notify_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, },