Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

404 linhas
13 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.28.1
  4. // protoc v3.20.0--rc2
  5. // source: connect.int.proto
  6. package pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  13. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  14. reflect "reflect"
  15. sync "sync"
  16. )
  17. const (
  18. // Verify that this generated code is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  20. // Verify that runtime/protoimpl is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  22. )
  23. type DeliverMessageReq struct {
  24. state protoimpl.MessageState
  25. sizeCache protoimpl.SizeCache
  26. unknownFields protoimpl.UnknownFields
  27. DeviceId int64 `protobuf:"varint,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // 设备id
  28. MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
  29. }
  30. func (x *DeliverMessageReq) Reset() {
  31. *x = DeliverMessageReq{}
  32. if protoimpl.UnsafeEnabled {
  33. mi := &file_connect_int_proto_msgTypes[0]
  34. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  35. ms.StoreMessageInfo(mi)
  36. }
  37. }
  38. func (x *DeliverMessageReq) String() string {
  39. return protoimpl.X.MessageStringOf(x)
  40. }
  41. func (*DeliverMessageReq) ProtoMessage() {}
  42. func (x *DeliverMessageReq) ProtoReflect() protoreflect.Message {
  43. mi := &file_connect_int_proto_msgTypes[0]
  44. if protoimpl.UnsafeEnabled && x != nil {
  45. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  46. if ms.LoadMessageInfo() == nil {
  47. ms.StoreMessageInfo(mi)
  48. }
  49. return ms
  50. }
  51. return mi.MessageOf(x)
  52. }
  53. // Deprecated: Use DeliverMessageReq.ProtoReflect.Descriptor instead.
  54. func (*DeliverMessageReq) Descriptor() ([]byte, []int) {
  55. return file_connect_int_proto_rawDescGZIP(), []int{0}
  56. }
  57. func (x *DeliverMessageReq) GetDeviceId() int64 {
  58. if x != nil {
  59. return x.DeviceId
  60. }
  61. return 0
  62. }
  63. func (x *DeliverMessageReq) GetMessageSend() *MessageSend {
  64. if x != nil {
  65. return x.MessageSend
  66. }
  67. return nil
  68. }
  69. // 房间推送
  70. type PushRoomMsg struct {
  71. state protoimpl.MessageState
  72. sizeCache protoimpl.SizeCache
  73. unknownFields protoimpl.UnknownFields
  74. RoomId int64 `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` // 设备id
  75. MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
  76. }
  77. func (x *PushRoomMsg) Reset() {
  78. *x = PushRoomMsg{}
  79. if protoimpl.UnsafeEnabled {
  80. mi := &file_connect_int_proto_msgTypes[1]
  81. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  82. ms.StoreMessageInfo(mi)
  83. }
  84. }
  85. func (x *PushRoomMsg) String() string {
  86. return protoimpl.X.MessageStringOf(x)
  87. }
  88. func (*PushRoomMsg) ProtoMessage() {}
  89. func (x *PushRoomMsg) ProtoReflect() protoreflect.Message {
  90. mi := &file_connect_int_proto_msgTypes[1]
  91. if protoimpl.UnsafeEnabled && x != nil {
  92. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  93. if ms.LoadMessageInfo() == nil {
  94. ms.StoreMessageInfo(mi)
  95. }
  96. return ms
  97. }
  98. return mi.MessageOf(x)
  99. }
  100. // Deprecated: Use PushRoomMsg.ProtoReflect.Descriptor instead.
  101. func (*PushRoomMsg) Descriptor() ([]byte, []int) {
  102. return file_connect_int_proto_rawDescGZIP(), []int{1}
  103. }
  104. func (x *PushRoomMsg) GetRoomId() int64 {
  105. if x != nil {
  106. return x.RoomId
  107. }
  108. return 0
  109. }
  110. func (x *PushRoomMsg) GetMessageSend() *MessageSend {
  111. if x != nil {
  112. return x.MessageSend
  113. }
  114. return nil
  115. }
  116. // 房间推送
  117. type PushAllMsg struct {
  118. state protoimpl.MessageState
  119. sizeCache protoimpl.SizeCache
  120. unknownFields protoimpl.UnknownFields
  121. MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
  122. }
  123. func (x *PushAllMsg) Reset() {
  124. *x = PushAllMsg{}
  125. if protoimpl.UnsafeEnabled {
  126. mi := &file_connect_int_proto_msgTypes[2]
  127. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  128. ms.StoreMessageInfo(mi)
  129. }
  130. }
  131. func (x *PushAllMsg) String() string {
  132. return protoimpl.X.MessageStringOf(x)
  133. }
  134. func (*PushAllMsg) ProtoMessage() {}
  135. func (x *PushAllMsg) ProtoReflect() protoreflect.Message {
  136. mi := &file_connect_int_proto_msgTypes[2]
  137. if protoimpl.UnsafeEnabled && x != nil {
  138. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  139. if ms.LoadMessageInfo() == nil {
  140. ms.StoreMessageInfo(mi)
  141. }
  142. return ms
  143. }
  144. return mi.MessageOf(x)
  145. }
  146. // Deprecated: Use PushAllMsg.ProtoReflect.Descriptor instead.
  147. func (*PushAllMsg) Descriptor() ([]byte, []int) {
  148. return file_connect_int_proto_rawDescGZIP(), []int{2}
  149. }
  150. func (x *PushAllMsg) GetMessageSend() *MessageSend {
  151. if x != nil {
  152. return x.MessageSend
  153. }
  154. return nil
  155. }
  156. var File_connect_int_proto protoreflect.FileDescriptor
  157. var file_connect_int_proto_rawDesc = []byte{
  158. 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72,
  159. 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
  160. 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
  161. 0x63, 0x74, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x11,
  162. 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
  163. 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
  164. 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x32,
  165. 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02,
  166. 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
  167. 0x65, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,
  168. 0x6e, 0x64, 0x22, 0x5a, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x73,
  169. 0x67, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
  170. 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x0c, 0x6d, 0x65,
  171. 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
  172. 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e,
  173. 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x22, 0x40,
  174. 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x0c,
  175. 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01,
  176. 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53,
  177. 0x65, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64,
  178. 0x32, 0x40, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x74, 0x12, 0x32,
  179. 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  180. 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73,
  181. 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70,
  182. 0x74, 0x79, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62,
  183. 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  184. }
  185. var (
  186. file_connect_int_proto_rawDescOnce sync.Once
  187. file_connect_int_proto_rawDescData = file_connect_int_proto_rawDesc
  188. )
  189. func file_connect_int_proto_rawDescGZIP() []byte {
  190. file_connect_int_proto_rawDescOnce.Do(func() {
  191. file_connect_int_proto_rawDescData = protoimpl.X.CompressGZIP(file_connect_int_proto_rawDescData)
  192. })
  193. return file_connect_int_proto_rawDescData
  194. }
  195. var file_connect_int_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  196. var file_connect_int_proto_goTypes = []interface{}{
  197. (*DeliverMessageReq)(nil), // 0: pb.DeliverMessageReq
  198. (*PushRoomMsg)(nil), // 1: pb.PushRoomMsg
  199. (*PushAllMsg)(nil), // 2: pb.PushAllMsg
  200. (*MessageSend)(nil), // 3: pb.MessageSend
  201. (*Empty)(nil), // 4: pb.Empty
  202. }
  203. var file_connect_int_proto_depIdxs = []int32{
  204. 3, // 0: pb.DeliverMessageReq.message_send:type_name -> pb.MessageSend
  205. 3, // 1: pb.PushRoomMsg.message_send:type_name -> pb.MessageSend
  206. 3, // 2: pb.PushAllMsg.message_send:type_name -> pb.MessageSend
  207. 0, // 3: pb.ConnectInt.DeliverMessage:input_type -> pb.DeliverMessageReq
  208. 4, // 4: pb.ConnectInt.DeliverMessage:output_type -> pb.Empty
  209. 4, // [4:5] is the sub-list for method output_type
  210. 3, // [3:4] is the sub-list for method input_type
  211. 3, // [3:3] is the sub-list for extension type_name
  212. 3, // [3:3] is the sub-list for extension extendee
  213. 0, // [0:3] is the sub-list for field type_name
  214. }
  215. func init() { file_connect_int_proto_init() }
  216. func file_connect_int_proto_init() {
  217. if File_connect_int_proto != nil {
  218. return
  219. }
  220. file_common_ext_proto_init()
  221. file_connect_ext_proto_init()
  222. if !protoimpl.UnsafeEnabled {
  223. file_connect_int_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  224. switch v := v.(*DeliverMessageReq); i {
  225. case 0:
  226. return &v.state
  227. case 1:
  228. return &v.sizeCache
  229. case 2:
  230. return &v.unknownFields
  231. default:
  232. return nil
  233. }
  234. }
  235. file_connect_int_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  236. switch v := v.(*PushRoomMsg); i {
  237. case 0:
  238. return &v.state
  239. case 1:
  240. return &v.sizeCache
  241. case 2:
  242. return &v.unknownFields
  243. default:
  244. return nil
  245. }
  246. }
  247. file_connect_int_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  248. switch v := v.(*PushAllMsg); i {
  249. case 0:
  250. return &v.state
  251. case 1:
  252. return &v.sizeCache
  253. case 2:
  254. return &v.unknownFields
  255. default:
  256. return nil
  257. }
  258. }
  259. }
  260. type x struct{}
  261. out := protoimpl.TypeBuilder{
  262. File: protoimpl.DescBuilder{
  263. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  264. RawDescriptor: file_connect_int_proto_rawDesc,
  265. NumEnums: 0,
  266. NumMessages: 3,
  267. NumExtensions: 0,
  268. NumServices: 1,
  269. },
  270. GoTypes: file_connect_int_proto_goTypes,
  271. DependencyIndexes: file_connect_int_proto_depIdxs,
  272. MessageInfos: file_connect_int_proto_msgTypes,
  273. }.Build()
  274. File_connect_int_proto = out.File
  275. file_connect_int_proto_rawDesc = nil
  276. file_connect_int_proto_goTypes = nil
  277. file_connect_int_proto_depIdxs = nil
  278. }
  279. // This is a compile-time assertion to ensure that this generated file
  280. // is compatible with the grpc package it is being compiled against.
  281. // Requires gRPC-Go v1.32.0 or later.
  282. const _ = grpc.SupportPackageIsVersion7
  283. // ConnectIntClient is the client API for ConnectInt service.
  284. //
  285. // 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.
  286. type ConnectIntClient interface {
  287. // 消息投递
  288. DeliverMessage(ctx context.Context, in *DeliverMessageReq, opts ...grpc.CallOption) (*Empty, error)
  289. }
  290. type connectIntClient struct {
  291. cc grpc.ClientConnInterface
  292. }
  293. func NewConnectIntClient(cc grpc.ClientConnInterface) ConnectIntClient {
  294. return &connectIntClient{cc}
  295. }
  296. func (c *connectIntClient) DeliverMessage(ctx context.Context, in *DeliverMessageReq, opts ...grpc.CallOption) (*Empty, error) {
  297. out := new(Empty)
  298. err := c.cc.Invoke(ctx, "/pb.ConnectInt/DeliverMessage", in, out, opts...)
  299. if err != nil {
  300. return nil, err
  301. }
  302. return out, nil
  303. }
  304. // ConnectIntServer is the server API for ConnectInt service.
  305. // All implementations must embed UnimplementedConnectIntServer
  306. // for forward compatibility
  307. type ConnectIntServer interface {
  308. // 消息投递
  309. DeliverMessage(context.Context, *DeliverMessageReq) (*Empty, error)
  310. }
  311. // UnimplementedConnectIntServer must be embedded to have forward compatible implementations.
  312. type UnimplementedConnectIntServer struct {
  313. }
  314. func (UnimplementedConnectIntServer) DeliverMessage(context.Context, *DeliverMessageReq) (*Empty, error) {
  315. return nil, status.Errorf(codes.Unimplemented, "method DeliverMessage not implemented")
  316. }
  317. // UnsafeConnectIntServer may be embedded to opt out of forward compatibility for this service.
  318. // Use of this interface is not recommended, as added methods to ConnectIntServer will
  319. // result in compilation errors.
  320. type UnsafeConnectIntServer interface {
  321. }
  322. func RegisterConnectIntServer(s grpc.ServiceRegistrar, srv ConnectIntServer) {
  323. s.RegisterService(&ConnectInt_ServiceDesc, srv)
  324. }
  325. func _ConnectInt_DeliverMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  326. in := new(DeliverMessageReq)
  327. if err := dec(in); err != nil {
  328. return nil, err
  329. }
  330. if interceptor == nil {
  331. return srv.(ConnectIntServer).DeliverMessage(ctx, in)
  332. }
  333. info := &grpc.UnaryServerInfo{
  334. Server: srv,
  335. FullMethod: "/pb.ConnectInt/DeliverMessage",
  336. }
  337. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  338. return srv.(ConnectIntServer).DeliverMessage(ctx, req.(*DeliverMessageReq))
  339. }
  340. return interceptor(ctx, in, info, handler)
  341. }
  342. // ConnectInt_ServiceDesc is the grpc.ServiceDesc for ConnectInt service.
  343. // It's only intended for direct use with grpc.RegisterService,
  344. // and not to be introspected or modified (even as a copy)
  345. var ConnectInt_ServiceDesc = grpc.ServiceDesc{
  346. ServiceName: "pb.ConnectInt",
  347. HandlerType: (*ConnectIntServer)(nil),
  348. Methods: []grpc.MethodDesc{
  349. {
  350. MethodName: "DeliverMessage",
  351. Handler: _ConnectInt_DeliverMessage_Handler,
  352. },
  353. },
  354. Streams: []grpc.StreamDesc{},
  355. Metadata: "connect.int.proto",
  356. }