|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.28.1
- // protoc v3.20.0--rc2
- // source: connect.int.proto
-
- package pb
-
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- )
-
- 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 DeliverMessageReq struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- DeviceId int64 `protobuf:"varint,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // 设备id
- MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
- }
-
- func (x *DeliverMessageReq) Reset() {
- *x = DeliverMessageReq{}
- if protoimpl.UnsafeEnabled {
- mi := &file_connect_int_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
-
- func (x *DeliverMessageReq) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
-
- func (*DeliverMessageReq) ProtoMessage() {}
-
- func (x *DeliverMessageReq) ProtoReflect() protoreflect.Message {
- mi := &file_connect_int_proto_msgTypes[0]
- 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 DeliverMessageReq.ProtoReflect.Descriptor instead.
- func (*DeliverMessageReq) Descriptor() ([]byte, []int) {
- return file_connect_int_proto_rawDescGZIP(), []int{0}
- }
-
- func (x *DeliverMessageReq) GetDeviceId() int64 {
- if x != nil {
- return x.DeviceId
- }
- return 0
- }
-
- func (x *DeliverMessageReq) GetMessageSend() *MessageSend {
- if x != nil {
- return x.MessageSend
- }
- return nil
- }
-
- // 房间推送
- type PushRoomMsg struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- RoomId int64 `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` // 设备id
- MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
- }
-
- func (x *PushRoomMsg) Reset() {
- *x = PushRoomMsg{}
- if protoimpl.UnsafeEnabled {
- mi := &file_connect_int_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
-
- func (x *PushRoomMsg) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
-
- func (*PushRoomMsg) ProtoMessage() {}
-
- func (x *PushRoomMsg) ProtoReflect() protoreflect.Message {
- mi := &file_connect_int_proto_msgTypes[1]
- 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 PushRoomMsg.ProtoReflect.Descriptor instead.
- func (*PushRoomMsg) Descriptor() ([]byte, []int) {
- return file_connect_int_proto_rawDescGZIP(), []int{1}
- }
-
- func (x *PushRoomMsg) GetRoomId() int64 {
- if x != nil {
- return x.RoomId
- }
- return 0
- }
-
- func (x *PushRoomMsg) GetMessageSend() *MessageSend {
- if x != nil {
- return x.MessageSend
- }
- return nil
- }
-
- // 房间推送
- type PushAllMsg struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- MessageSend *MessageSend `protobuf:"bytes,2,opt,name=message_send,json=messageSend,proto3" json:"message_send,omitempty"` // 数据
- }
-
- func (x *PushAllMsg) Reset() {
- *x = PushAllMsg{}
- if protoimpl.UnsafeEnabled {
- mi := &file_connect_int_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- }
-
- func (x *PushAllMsg) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
-
- func (*PushAllMsg) ProtoMessage() {}
-
- func (x *PushAllMsg) ProtoReflect() protoreflect.Message {
- mi := &file_connect_int_proto_msgTypes[2]
- 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 PushAllMsg.ProtoReflect.Descriptor instead.
- func (*PushAllMsg) Descriptor() ([]byte, []int) {
- return file_connect_int_proto_rawDescGZIP(), []int{2}
- }
-
- func (x *PushAllMsg) GetMessageSend() *MessageSend {
- if x != nil {
- return x.MessageSend
- }
- return nil
- }
-
- var File_connect_int_proto protoreflect.FileDescriptor
-
- var file_connect_int_proto_rawDesc = []byte{
- 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
- 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x11,
- 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
- 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x32,
- 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
- 0x65, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65,
- 0x6e, 0x64, 0x22, 0x5a, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x73,
- 0x67, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x0c, 0x6d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e,
- 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x22, 0x40,
- 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x0c,
- 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53,
- 0x65, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64,
- 0x32, 0x40, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x74, 0x12, 0x32,
- 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
- 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73,
- 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70,
- 0x74, 0x79, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62,
- 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
- }
-
- var (
- file_connect_int_proto_rawDescOnce sync.Once
- file_connect_int_proto_rawDescData = file_connect_int_proto_rawDesc
- )
-
- func file_connect_int_proto_rawDescGZIP() []byte {
- file_connect_int_proto_rawDescOnce.Do(func() {
- file_connect_int_proto_rawDescData = protoimpl.X.CompressGZIP(file_connect_int_proto_rawDescData)
- })
- return file_connect_int_proto_rawDescData
- }
-
- var file_connect_int_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
- var file_connect_int_proto_goTypes = []interface{}{
- (*DeliverMessageReq)(nil), // 0: pb.DeliverMessageReq
- (*PushRoomMsg)(nil), // 1: pb.PushRoomMsg
- (*PushAllMsg)(nil), // 2: pb.PushAllMsg
- (*MessageSend)(nil), // 3: pb.MessageSend
- (*Empty)(nil), // 4: pb.Empty
- }
- var file_connect_int_proto_depIdxs = []int32{
- 3, // 0: pb.DeliverMessageReq.message_send:type_name -> pb.MessageSend
- 3, // 1: pb.PushRoomMsg.message_send:type_name -> pb.MessageSend
- 3, // 2: pb.PushAllMsg.message_send:type_name -> pb.MessageSend
- 0, // 3: pb.ConnectInt.DeliverMessage:input_type -> pb.DeliverMessageReq
- 4, // 4: pb.ConnectInt.DeliverMessage:output_type -> pb.Empty
- 4, // [4:5] is the sub-list for method output_type
- 3, // [3:4] is the sub-list for method input_type
- 3, // [3:3] is the sub-list for extension type_name
- 3, // [3:3] is the sub-list for extension extendee
- 0, // [0:3] is the sub-list for field type_name
- }
-
- func init() { file_connect_int_proto_init() }
- func file_connect_int_proto_init() {
- if File_connect_int_proto != nil {
- return
- }
- file_common_ext_proto_init()
- file_connect_ext_proto_init()
- if !protoimpl.UnsafeEnabled {
- file_connect_int_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeliverMessageReq); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_connect_int_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PushRoomMsg); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_connect_int_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*PushAllMsg); 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{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_connect_int_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 3,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_connect_int_proto_goTypes,
- DependencyIndexes: file_connect_int_proto_depIdxs,
- MessageInfos: file_connect_int_proto_msgTypes,
- }.Build()
- File_connect_int_proto = out.File
- file_connect_int_proto_rawDesc = nil
- file_connect_int_proto_goTypes = nil
- file_connect_int_proto_depIdxs = nil
- }
-
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
-
- // ConnectIntClient is the client API for ConnectInt service.
- //
- // 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.
- type ConnectIntClient interface {
- // 消息投递
- DeliverMessage(ctx context.Context, in *DeliverMessageReq, opts ...grpc.CallOption) (*Empty, error)
- }
-
- type connectIntClient struct {
- cc grpc.ClientConnInterface
- }
-
- func NewConnectIntClient(cc grpc.ClientConnInterface) ConnectIntClient {
- return &connectIntClient{cc}
- }
-
- func (c *connectIntClient) DeliverMessage(ctx context.Context, in *DeliverMessageReq, opts ...grpc.CallOption) (*Empty, error) {
- out := new(Empty)
- err := c.cc.Invoke(ctx, "/pb.ConnectInt/DeliverMessage", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- // ConnectIntServer is the server API for ConnectInt service.
- // All implementations must embed UnimplementedConnectIntServer
- // for forward compatibility
- type ConnectIntServer interface {
- // 消息投递
- DeliverMessage(context.Context, *DeliverMessageReq) (*Empty, error)
- }
-
- // UnimplementedConnectIntServer must be embedded to have forward compatible implementations.
- type UnimplementedConnectIntServer struct {
- }
-
- func (UnimplementedConnectIntServer) DeliverMessage(context.Context, *DeliverMessageReq) (*Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeliverMessage not implemented")
- }
-
- // UnsafeConnectIntServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to ConnectIntServer will
- // result in compilation errors.
- type UnsafeConnectIntServer interface {
- }
-
- func RegisterConnectIntServer(s grpc.ServiceRegistrar, srv ConnectIntServer) {
- s.RegisterService(&ConnectInt_ServiceDesc, srv)
- }
-
- func _ConnectInt_DeliverMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeliverMessageReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ConnectIntServer).DeliverMessage(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.ConnectInt/DeliverMessage",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ConnectIntServer).DeliverMessage(ctx, req.(*DeliverMessageReq))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- // ConnectInt_ServiceDesc is the grpc.ServiceDesc for ConnectInt service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var ConnectInt_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "pb.ConnectInt",
- HandlerType: (*ConnectIntServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "DeliverMessage",
- Handler: _ConnectInt_DeliverMessage_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "connect.int.proto",
- }
|