// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc v5.29.3 // source: msgbus.proto package pb import ( reflect "reflect" sync "sync" unsafe "unsafe" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type EnumMsgType int32 const ( EnumMsgType_MsgTypeNone EnumMsgType = 0 // 未知消息类型 EnumMsgType_MsgTypeLogin EnumMsgType = 1 // 客户端长连接登录包 EnumMsgType_MsgTypeLogout EnumMsgType = 2 // 客户端长连接登出包 EnumMsgType_MsgTypeConnect EnumMsgType = 3 // 新建链接消息 EnumMsgType_MsgTypeDisconnect EnumMsgType = 4 // 关闭链接消息 EnumMsgType_MsgTypeData EnumMsgType = 5 // 消息透传转发 ) // Enum value maps for EnumMsgType. var ( EnumMsgType_name = map[int32]string{ 0: "MsgTypeNone", 1: "MsgTypeLogin", 2: "MsgTypeLogout", 3: "MsgTypeConnect", 4: "MsgTypeDisconnect", 5: "MsgTypeData", } EnumMsgType_value = map[string]int32{ "MsgTypeNone": 0, "MsgTypeLogin": 1, "MsgTypeLogout": 2, "MsgTypeConnect": 3, "MsgTypeDisconnect": 4, "MsgTypeData": 5, } ) func (x EnumMsgType) Enum() *EnumMsgType { p := new(EnumMsgType) *p = x return p } func (x EnumMsgType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (EnumMsgType) Descriptor() protoreflect.EnumDescriptor { return file_msgbus_proto_enumTypes[0].Descriptor() } func (EnumMsgType) Type() protoreflect.EnumType { return &file_msgbus_proto_enumTypes[0] } func (x EnumMsgType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use EnumMsgType.Descriptor instead. func (EnumMsgType) EnumDescriptor() ([]byte, []int) { return file_msgbus_proto_rawDescGZIP(), []int{0} } // 渠道类型 type EnumChannelType int32 const ( EnumChannelType_ChannelTypeNone EnumChannelType = 0 EnumChannelType_ChannelTypeMqtt EnumChannelType = 1 // 1-MQTT服务器 EnumChannelType_ChannelTypeTcp EnumChannelType = 2 // 2-TCP服务器 EnumChannelType_ChannelTypeUdp EnumChannelType = 3 // 3-UDP服务器 EnumChannelType_ChannelTypeHttp EnumChannelType = 4 // 4-HTTP服务 EnumChannelType_ChannelTypeWs EnumChannelType = 5 // 5-WebSocket服务 EnumChannelType_ChannelTypeDb EnumChannelType = 6 // 6-数据库服务 EnumChannelType_ChannelTypeInner EnumChannelType = 100 // 100-内网流转通道 ) // Enum value maps for EnumChannelType. var ( EnumChannelType_name = map[int32]string{ 0: "ChannelTypeNone", 1: "ChannelTypeMqtt", 2: "ChannelTypeTcp", 3: "ChannelTypeUdp", 4: "ChannelTypeHttp", 5: "ChannelTypeWs", 6: "ChannelTypeDb", 100: "ChannelTypeInner", } EnumChannelType_value = map[string]int32{ "ChannelTypeNone": 0, "ChannelTypeMqtt": 1, "ChannelTypeTcp": 2, "ChannelTypeUdp": 3, "ChannelTypeHttp": 4, "ChannelTypeWs": 5, "ChannelTypeDb": 6, "ChannelTypeInner": 100, } ) func (x EnumChannelType) Enum() *EnumChannelType { p := new(EnumChannelType) *p = x return p } func (x EnumChannelType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (EnumChannelType) Descriptor() protoreflect.EnumDescriptor { return file_msgbus_proto_enumTypes[1].Descriptor() } func (EnumChannelType) Type() protoreflect.EnumType { return &file_msgbus_proto_enumTypes[1] } func (x EnumChannelType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use EnumChannelType.Descriptor instead. func (EnumChannelType) EnumDescriptor() ([]byte, []int) { return file_msgbus_proto_rawDescGZIP(), []int{1} } // 渠道信息 type Channel struct { state protoimpl.MessageState `protogen:"open.v1"` ChannelId int64 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" dc:"渠道ID"` // 渠道ID ChannelType int32 `protobuf:"varint,2,opt,name=channel_type,json=channelType,proto3" json:"channel_type,omitempty" dc:"渠道类型 EnumChannelType"` // 渠道类型 EnumChannelType ServerId int64 `protobuf:"varint,3,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty" dc:"服务ID"` // 服务ID CreateTime int64 `protobuf:"varint,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" dc:"启动时间戳(秒)"` // 启动时间戳(秒) TenantId string `protobuf:"bytes,5,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty" dc:"租户ID"` // 租户ID unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Channel) Reset() { *x = Channel{} mi := &file_msgbus_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Channel) String() string { return protoimpl.X.MessageStringOf(x) } func (*Channel) ProtoMessage() {} func (x *Channel) ProtoReflect() protoreflect.Message { mi := &file_msgbus_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Channel.ProtoReflect.Descriptor instead. func (*Channel) Descriptor() ([]byte, []int) { return file_msgbus_proto_rawDescGZIP(), []int{0} } func (x *Channel) GetChannelId() int64 { if x != nil { return x.ChannelId } return 0 } func (x *Channel) GetChannelType() int32 { if x != nil { return x.ChannelType } return 0 } func (x *Channel) GetServerId() int64 { if x != nil { return x.ServerId } return 0 } func (x *Channel) GetCreateTime() int64 { if x != nil { return x.CreateTime } return 0 } func (x *Channel) GetTenantId() string { if x != nil { return x.TenantId } return "" } // 链接信息 type Conn struct { state protoimpl.MessageState `protogen:"open.v1"` ConnId int64 `protobuf:"varint,1,opt,name=conn_id,json=connId,proto3" json:"conn_id,omitempty" dc:"链接ID"` // 链接ID CreateTime int64 `protobuf:"varint,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" dc:"链接时间戳(秒)"` // 链接时间戳(秒) LastRecvTime int64 `protobuf:"varint,3,opt,name=last_recv_time,json=lastRecvTime,proto3" json:"last_recv_time,omitempty" dc:"最后接收时间戳(秒)"` // 最后接收时间戳(秒) LastSendTime int64 `protobuf:"varint,4,opt,name=last_send_time,json=lastSendTime,proto3" json:"last_send_time,omitempty" dc:"最后发送时间戳(秒)"` // 最后发送时间戳(秒) ClientId string `protobuf:"bytes,5,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" dc:"客户端ID"` // 客户端ID UserName string `protobuf:"bytes,6,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty" dc:"客户端登录名称"` // 客户端登录名称 UserPass string `protobuf:"bytes,7,opt,name=user_pass,json=userPass,proto3" json:"user_pass,omitempty" dc:"客户端登录密码"` // 客户端登录密码 ProductKey string `protobuf:"bytes,8,opt,name=product_key,json=productKey,proto3" json:"product_key,omitempty" dc:"绑定主产品KEY"` // 绑定主产品KEY DeviceKey string `protobuf:"bytes,9,opt,name=device_key,json=deviceKey,proto3" json:"device_key,omitempty" dc:"绑定主设备KEY"` // 绑定主设备KEY RemoteAddr string `protobuf:"bytes,10,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` LocalAddr string `protobuf:"bytes,11,opt,name=local_addr,json=localAddr,proto3" json:"local_addr,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Conn) Reset() { *x = Conn{} mi := &file_msgbus_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Conn) String() string { return protoimpl.X.MessageStringOf(x) } func (*Conn) ProtoMessage() {} func (x *Conn) ProtoReflect() protoreflect.Message { mi := &file_msgbus_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Conn.ProtoReflect.Descriptor instead. func (*Conn) Descriptor() ([]byte, []int) { return file_msgbus_proto_rawDescGZIP(), []int{1} } func (x *Conn) GetConnId() int64 { if x != nil { return x.ConnId } return 0 } func (x *Conn) GetCreateTime() int64 { if x != nil { return x.CreateTime } return 0 } func (x *Conn) GetLastRecvTime() int64 { if x != nil { return x.LastRecvTime } return 0 } func (x *Conn) GetLastSendTime() int64 { if x != nil { return x.LastSendTime } return 0 } func (x *Conn) GetClientId() string { if x != nil { return x.ClientId } return "" } func (x *Conn) GetUserName() string { if x != nil { return x.UserName } return "" } func (x *Conn) GetUserPass() string { if x != nil { return x.UserPass } return "" } func (x *Conn) GetProductKey() string { if x != nil { return x.ProductKey } return "" } func (x *Conn) GetDeviceKey() string { if x != nil { return x.DeviceKey } return "" } func (x *Conn) GetRemoteAddr() string { if x != nil { return x.RemoteAddr } return "" } func (x *Conn) GetLocalAddr() string { if x != nil { return x.LocalAddr } return "" } type SendMsgReq struct { state protoimpl.MessageState `protogen:"open.v1"` Head *HeadReq `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` Channel *Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty" dc:"渠道信息"` // 渠道信息 Conn *Conn `protobuf:"bytes,3,opt,name=conn,proto3" json:"conn,omitempty" dc:"链接信息"` // 链接信息 MsgType int32 `protobuf:"varint,4,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty" dc:"消息类型"` // 消息类型 Topic string `protobuf:"bytes,5,opt,name=topic,proto3" json:"topic,omitempty"` Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SendMsgReq) Reset() { *x = SendMsgReq{} mi := &file_msgbus_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *SendMsgReq) String() string { return protoimpl.X.MessageStringOf(x) } func (*SendMsgReq) ProtoMessage() {} func (x *SendMsgReq) ProtoReflect() protoreflect.Message { mi := &file_msgbus_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SendMsgReq.ProtoReflect.Descriptor instead. func (*SendMsgReq) Descriptor() ([]byte, []int) { return file_msgbus_proto_rawDescGZIP(), []int{2} } func (x *SendMsgReq) GetHead() *HeadReq { if x != nil { return x.Head } return nil } func (x *SendMsgReq) GetChannel() *Channel { if x != nil { return x.Channel } return nil } func (x *SendMsgReq) GetConn() *Conn { if x != nil { return x.Conn } return nil } func (x *SendMsgReq) GetMsgType() int32 { if x != nil { return x.MsgType } return 0 } func (x *SendMsgReq) GetTopic() string { if x != nil { return x.Topic } return "" } func (x *SendMsgReq) GetData() []byte { if x != nil { return x.Data } return nil } type SendMsgRes struct { state protoimpl.MessageState `protogen:"open.v1"` Head *HeadRes `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` Conn *Conn `protobuf:"bytes,2,opt,name=conn,proto3" json:"conn,omitempty"` Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SendMsgRes) Reset() { *x = SendMsgRes{} mi := &file_msgbus_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *SendMsgRes) String() string { return protoimpl.X.MessageStringOf(x) } func (*SendMsgRes) ProtoMessage() {} func (x *SendMsgRes) ProtoReflect() protoreflect.Message { mi := &file_msgbus_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SendMsgRes.ProtoReflect.Descriptor instead. func (*SendMsgRes) Descriptor() ([]byte, []int) { return file_msgbus_proto_rawDescGZIP(), []int{3} } func (x *SendMsgRes) GetHead() *HeadRes { if x != nil { return x.Head } return nil } func (x *SendMsgRes) GetConn() *Conn { if x != nil { return x.Conn } return nil } func (x *SendMsgRes) GetTopic() string { if x != nil { return x.Topic } return "" } func (x *SendMsgRes) GetData() []byte { if x != nil { return x.Data } return nil } var File_msgbus_proto protoreflect.FileDescriptor const file_msgbus_proto_rawDesc = "" + "\n" + "\fmsgbus.proto\x12\bPbMsgBus\x1a\fcommon.proto\"\xa6\x01\n" + "\aChannel\x12\x1d\n" + "\n" + "channel_id\x18\x01 \x01(\x03R\tchannelId\x12!\n" + "\fchannel_type\x18\x02 \x01(\x05R\vchannelType\x12\x1b\n" + "\tserver_id\x18\x03 \x01(\x03R\bserverId\x12\x1f\n" + "\vcreate_time\x18\x04 \x01(\x03R\n" + "createTime\x12\x1b\n" + "\ttenant_id\x18\x05 \x01(\tR\btenantId\"\xe3\x02\n" + "\x04Conn\x12\x17\n" + "\aconn_id\x18\x01 \x01(\x03R\x06connId\x12\x1f\n" + "\vcreate_time\x18\x02 \x01(\x03R\n" + "createTime\x12$\n" + "\x0elast_recv_time\x18\x03 \x01(\x03R\flastRecvTime\x12$\n" + "\x0elast_send_time\x18\x04 \x01(\x03R\flastSendTime\x12\x1b\n" + "\tclient_id\x18\x05 \x01(\tR\bclientId\x12\x1b\n" + "\tuser_name\x18\x06 \x01(\tR\buserName\x12\x1b\n" + "\tuser_pass\x18\a \x01(\tR\buserPass\x12\x1f\n" + "\vproduct_key\x18\b \x01(\tR\n" + "productKey\x12\x1d\n" + "\n" + "device_key\x18\t \x01(\tR\tdeviceKey\x12\x1f\n" + "\vremote_addr\x18\n" + " \x01(\tR\n" + "remoteAddr\x12\x1d\n" + "\n" + "local_addr\x18\v \x01(\tR\tlocalAddr\"\xc9\x01\n" + "\n" + "SendMsgReq\x12%\n" + "\x04head\x18\x01 \x01(\v2\x11.PbCommon.HeadReqR\x04head\x12+\n" + "\achannel\x18\x02 \x01(\v2\x11.PbMsgBus.ChannelR\achannel\x12\"\n" + "\x04conn\x18\x03 \x01(\v2\x0e.PbMsgBus.ConnR\x04conn\x12\x19\n" + "\bmsg_type\x18\x04 \x01(\x05R\amsgType\x12\x14\n" + "\x05topic\x18\x05 \x01(\tR\x05topic\x12\x12\n" + "\x04data\x18\x06 \x01(\fR\x04data\"\x81\x01\n" + "\n" + "SendMsgRes\x12%\n" + "\x04head\x18\x01 \x01(\v2\x11.PbCommon.HeadResR\x04head\x12\"\n" + "\x04conn\x18\x02 \x01(\v2\x0e.PbMsgBus.ConnR\x04conn\x12\x14\n" + "\x05topic\x18\x03 \x01(\tR\x05topic\x12\x12\n" + "\x04data\x18\x04 \x01(\fR\x04data*\x7f\n" + "\vEnumMsgType\x12\x0f\n" + "\vMsgTypeNone\x10\x00\x12\x10\n" + "\fMsgTypeLogin\x10\x01\x12\x11\n" + "\rMsgTypeLogout\x10\x02\x12\x12\n" + "\x0eMsgTypeConnect\x10\x03\x12\x15\n" + "\x11MsgTypeDisconnect\x10\x04\x12\x0f\n" + "\vMsgTypeData\x10\x05*\xb4\x01\n" + "\x0fEnumChannelType\x12\x13\n" + "\x0fChannelTypeNone\x10\x00\x12\x13\n" + "\x0fChannelTypeMqtt\x10\x01\x12\x12\n" + "\x0eChannelTypeTcp\x10\x02\x12\x12\n" + "\x0eChannelTypeUdp\x10\x03\x12\x13\n" + "\x0fChannelTypeHttp\x10\x04\x12\x11\n" + "\rChannelTypeWs\x10\x05\x12\x11\n" + "\rChannelTypeDb\x10\x06\x12\x14\n" + "\x10ChannelTypeInner\x10d2x\n" + "\x06MsgBus\x122\n" + "\x04Send\x12\x14.PbMsgBus.SendMsgReq\x1a\x14.PbMsgBus.SendMsgRes\x12:\n" + "\bLongSend\x12\x14.PbMsgBus.SendMsgReq\x1a\x14.PbMsgBus.SendMsgRes(\x010\x01B\x05Z\x03pb/b\x06proto3" var ( file_msgbus_proto_rawDescOnce sync.Once file_msgbus_proto_rawDescData []byte ) func file_msgbus_proto_rawDescGZIP() []byte { file_msgbus_proto_rawDescOnce.Do(func() { file_msgbus_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_msgbus_proto_rawDesc), len(file_msgbus_proto_rawDesc))) }) return file_msgbus_proto_rawDescData } var file_msgbus_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_msgbus_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_msgbus_proto_goTypes = []any{ (EnumMsgType)(0), // 0: PbMsgBus.EnumMsgType (EnumChannelType)(0), // 1: PbMsgBus.EnumChannelType (*Channel)(nil), // 2: PbMsgBus.Channel (*Conn)(nil), // 3: PbMsgBus.Conn (*SendMsgReq)(nil), // 4: PbMsgBus.SendMsgReq (*SendMsgRes)(nil), // 5: PbMsgBus.SendMsgRes (*HeadReq)(nil), // 6: PbCommon.HeadReq (*HeadRes)(nil), // 7: PbCommon.HeadRes } var file_msgbus_proto_depIdxs = []int32{ 6, // 0: PbMsgBus.SendMsgReq.head:type_name -> PbCommon.HeadReq 2, // 1: PbMsgBus.SendMsgReq.channel:type_name -> PbMsgBus.Channel 3, // 2: PbMsgBus.SendMsgReq.conn:type_name -> PbMsgBus.Conn 7, // 3: PbMsgBus.SendMsgRes.head:type_name -> PbCommon.HeadRes 3, // 4: PbMsgBus.SendMsgRes.conn:type_name -> PbMsgBus.Conn 4, // 5: PbMsgBus.MsgBus.Send:input_type -> PbMsgBus.SendMsgReq 4, // 6: PbMsgBus.MsgBus.LongSend:input_type -> PbMsgBus.SendMsgReq 5, // 7: PbMsgBus.MsgBus.Send:output_type -> PbMsgBus.SendMsgRes 5, // 8: PbMsgBus.MsgBus.LongSend:output_type -> PbMsgBus.SendMsgRes 7, // [7:9] is the sub-list for method output_type 5, // [5:7] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name } func init() { file_msgbus_proto_init() } func file_msgbus_proto_init() { if File_msgbus_proto != nil { return } file_common_proto_init() type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_msgbus_proto_rawDesc), len(file_msgbus_proto_rawDesc)), NumEnums: 2, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_msgbus_proto_goTypes, DependencyIndexes: file_msgbus_proto_depIdxs, EnumInfos: file_msgbus_proto_enumTypes, MessageInfos: file_msgbus_proto_msgTypes, }.Build() File_msgbus_proto = out.File file_msgbus_proto_goTypes = nil file_msgbus_proto_depIdxs = nil }