diff --git a/pkg/rpc/pb/message_receiver.pb.go b/pkg/rpc/pb/message_receiver.pb.go new file mode 100644 index 0000000..21c788e --- /dev/null +++ b/pkg/rpc/pb/message_receiver.pb.go @@ -0,0 +1,231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: models/message_receiver.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type MessageReceiver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"` + NodeId int64 `protobuf:"varint,3,opt,name=nodeId,proto3" json:"nodeId,omitempty"` + ServerId int64 `protobuf:"varint,4,opt,name=serverId,proto3" json:"serverId,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` + ParamsJSON []byte `protobuf:"bytes,6,opt,name=paramsJSON,proto3" json:"paramsJSON,omitempty"` + MessageRecipient *MessageRecipient `protobuf:"bytes,7,opt,name=messageRecipient,proto3" json:"messageRecipient,omitempty"` + MessageRecipientGroup *MessageRecipientGroup `protobuf:"bytes,8,opt,name=messageRecipientGroup,proto3" json:"messageRecipientGroup,omitempty"` +} + +func (x *MessageReceiver) Reset() { + *x = MessageReceiver{} + if protoimpl.UnsafeEnabled { + mi := &file_models_message_receiver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageReceiver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageReceiver) ProtoMessage() {} + +func (x *MessageReceiver) ProtoReflect() protoreflect.Message { + mi := &file_models_message_receiver_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 MessageReceiver.ProtoReflect.Descriptor instead. +func (*MessageReceiver) Descriptor() ([]byte, []int) { + return file_models_message_receiver_proto_rawDescGZIP(), []int{0} +} + +func (x *MessageReceiver) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *MessageReceiver) GetClusterId() int64 { + if x != nil { + return x.ClusterId + } + return 0 +} + +func (x *MessageReceiver) GetNodeId() int64 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *MessageReceiver) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *MessageReceiver) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *MessageReceiver) GetParamsJSON() []byte { + if x != nil { + return x.ParamsJSON + } + return nil +} + +func (x *MessageReceiver) GetMessageRecipient() *MessageRecipient { + if x != nil { + return x.MessageRecipient + } + return nil +} + +func (x *MessageReceiver) GetMessageRecipientGroup() *MessageRecipientGroup { + if x != nil { + return x.MessageRecipientGroup + } + return nil +} + +var File_models_message_receiver_proto protoreflect.FileDescriptor + +var file_models_message_receiver_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x02, 0x70, 0x62, 0x1a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x02, 0x0a, 0x0f, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, + 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, + 0x53, 0x4f, 0x4e, 0x12, 0x40, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_models_message_receiver_proto_rawDescOnce sync.Once + file_models_message_receiver_proto_rawDescData = file_models_message_receiver_proto_rawDesc +) + +func file_models_message_receiver_proto_rawDescGZIP() []byte { + file_models_message_receiver_proto_rawDescOnce.Do(func() { + file_models_message_receiver_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_message_receiver_proto_rawDescData) + }) + return file_models_message_receiver_proto_rawDescData +} + +var file_models_message_receiver_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_models_message_receiver_proto_goTypes = []interface{}{ + (*MessageReceiver)(nil), // 0: pb.MessageReceiver + (*MessageRecipient)(nil), // 1: pb.MessageRecipient + (*MessageRecipientGroup)(nil), // 2: pb.MessageRecipientGroup +} +var file_models_message_receiver_proto_depIdxs = []int32{ + 1, // 0: pb.MessageReceiver.messageRecipient:type_name -> pb.MessageRecipient + 2, // 1: pb.MessageReceiver.messageRecipientGroup:type_name -> pb.MessageRecipientGroup + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_models_message_receiver_proto_init() } +func file_models_message_receiver_proto_init() { + if File_models_message_receiver_proto != nil { + return + } + file_models_message_recipient_proto_init() + file_models_message_recipient_group_proto_init() + if !protoimpl.UnsafeEnabled { + file_models_message_receiver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageReceiver); 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_models_message_receiver_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_models_message_receiver_proto_goTypes, + DependencyIndexes: file_models_message_receiver_proto_depIdxs, + MessageInfos: file_models_message_receiver_proto_msgTypes, + }.Build() + File_models_message_receiver_proto = out.File + file_models_message_receiver_proto_rawDesc = nil + file_models_message_receiver_proto_goTypes = nil + file_models_message_receiver_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_message_receiver.pb.go b/pkg/rpc/pb/service_message_receiver.pb.go new file mode 100644 index 0000000..fc86cfb --- /dev/null +++ b/pkg/rpc/pb/service_message_receiver.pb.go @@ -0,0 +1,759 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_message_receiver.proto + +package pb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// 修改接收者 +type UpdateMessageReceiversRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeClusterId int64 `protobuf:"varint,1,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` + NodeId int64 `protobuf:"varint,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"` + ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` + ParamsJSON []byte `protobuf:"bytes,5,opt,name=paramsJSON,proto3" json:"paramsJSON,omitempty"` + RecipientOptions map[string]*UpdateMessageReceiversRequest_RecipientOptions `protobuf:"bytes,6,rep,name=recipientOptions,proto3" json:"recipientOptions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // type => options +} + +func (x *UpdateMessageReceiversRequest) Reset() { + *x = UpdateMessageReceiversRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_message_receiver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMessageReceiversRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMessageReceiversRequest) ProtoMessage() {} + +func (x *UpdateMessageReceiversRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_message_receiver_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 UpdateMessageReceiversRequest.ProtoReflect.Descriptor instead. +func (*UpdateMessageReceiversRequest) Descriptor() ([]byte, []int) { + return file_service_message_receiver_proto_rawDescGZIP(), []int{0} +} + +func (x *UpdateMessageReceiversRequest) GetNodeClusterId() int64 { + if x != nil { + return x.NodeClusterId + } + return 0 +} + +func (x *UpdateMessageReceiversRequest) GetNodeId() int64 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *UpdateMessageReceiversRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateMessageReceiversRequest) GetParamsJSON() []byte { + if x != nil { + return x.ParamsJSON + } + return nil +} + +func (x *UpdateMessageReceiversRequest) GetRecipientOptions() map[string]*UpdateMessageReceiversRequest_RecipientOptions { + if x != nil { + return x.RecipientOptions + } + return nil +} + +// 查找接收者 +type FindAllMessageReceiversRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeClusterId int64 `protobuf:"varint,1,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` + NodeId int64 `protobuf:"varint,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"` + ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` +} + +func (x *FindAllMessageReceiversRequest) Reset() { + *x = FindAllMessageReceiversRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_message_receiver_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllMessageReceiversRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllMessageReceiversRequest) ProtoMessage() {} + +func (x *FindAllMessageReceiversRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_message_receiver_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 FindAllMessageReceiversRequest.ProtoReflect.Descriptor instead. +func (*FindAllMessageReceiversRequest) Descriptor() ([]byte, []int) { + return file_service_message_receiver_proto_rawDescGZIP(), []int{1} +} + +func (x *FindAllMessageReceiversRequest) GetNodeClusterId() int64 { + if x != nil { + return x.NodeClusterId + } + return 0 +} + +func (x *FindAllMessageReceiversRequest) GetNodeId() int64 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *FindAllMessageReceiversRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +type FindAllMessageReceiversResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageReceivers []*MessageReceiver `protobuf:"bytes,1,rep,name=messageReceivers,proto3" json:"messageReceivers,omitempty"` +} + +func (x *FindAllMessageReceiversResponse) Reset() { + *x = FindAllMessageReceiversResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_message_receiver_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllMessageReceiversResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllMessageReceiversResponse) ProtoMessage() {} + +func (x *FindAllMessageReceiversResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_message_receiver_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 FindAllMessageReceiversResponse.ProtoReflect.Descriptor instead. +func (*FindAllMessageReceiversResponse) Descriptor() ([]byte, []int) { + return file_service_message_receiver_proto_rawDescGZIP(), []int{2} +} + +func (x *FindAllMessageReceiversResponse) GetMessageReceivers() []*MessageReceiver { + if x != nil { + return x.MessageReceivers + } + return nil +} + +// 删除接收者 +type DeleteMessageReceiverRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageReceiverId int64 `protobuf:"varint,1,opt,name=messageReceiverId,proto3" json:"messageReceiverId,omitempty"` +} + +func (x *DeleteMessageReceiverRequest) Reset() { + *x = DeleteMessageReceiverRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_message_receiver_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteMessageReceiverRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMessageReceiverRequest) ProtoMessage() {} + +func (x *DeleteMessageReceiverRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_message_receiver_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 DeleteMessageReceiverRequest.ProtoReflect.Descriptor instead. +func (*DeleteMessageReceiverRequest) Descriptor() ([]byte, []int) { + return file_service_message_receiver_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteMessageReceiverRequest) GetMessageReceiverId() int64 { + if x != nil { + return x.MessageReceiverId + } + return 0 +} + +type UpdateMessageReceiversRequest_RecipientOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MessageRecipientId int64 `protobuf:"varint,1,opt,name=messageRecipientId,proto3" json:"messageRecipientId,omitempty"` + MessageRecipientGroupId int64 `protobuf:"varint,2,opt,name=messageRecipientGroupId,proto3" json:"messageRecipientGroupId,omitempty"` +} + +func (x *UpdateMessageReceiversRequest_RecipientOption) Reset() { + *x = UpdateMessageReceiversRequest_RecipientOption{} + if protoimpl.UnsafeEnabled { + mi := &file_service_message_receiver_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMessageReceiversRequest_RecipientOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMessageReceiversRequest_RecipientOption) ProtoMessage() {} + +func (x *UpdateMessageReceiversRequest_RecipientOption) ProtoReflect() protoreflect.Message { + mi := &file_service_message_receiver_proto_msgTypes[5] + 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 UpdateMessageReceiversRequest_RecipientOption.ProtoReflect.Descriptor instead. +func (*UpdateMessageReceiversRequest_RecipientOption) Descriptor() ([]byte, []int) { + return file_service_message_receiver_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *UpdateMessageReceiversRequest_RecipientOption) GetMessageRecipientId() int64 { + if x != nil { + return x.MessageRecipientId + } + return 0 +} + +func (x *UpdateMessageReceiversRequest_RecipientOption) GetMessageRecipientGroupId() int64 { + if x != nil { + return x.MessageRecipientGroupId + } + return 0 +} + +type UpdateMessageReceiversRequest_RecipientOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RecipientOptions []*UpdateMessageReceiversRequest_RecipientOption `protobuf:"bytes,1,rep,name=recipientOptions,proto3" json:"recipientOptions,omitempty"` +} + +func (x *UpdateMessageReceiversRequest_RecipientOptions) Reset() { + *x = UpdateMessageReceiversRequest_RecipientOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_service_message_receiver_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMessageReceiversRequest_RecipientOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMessageReceiversRequest_RecipientOptions) ProtoMessage() {} + +func (x *UpdateMessageReceiversRequest_RecipientOptions) ProtoReflect() protoreflect.Message { + mi := &file_service_message_receiver_proto_msgTypes[6] + 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 UpdateMessageReceiversRequest_RecipientOptions.ProtoReflect.Descriptor instead. +func (*UpdateMessageReceiversRequest_RecipientOptions) Descriptor() ([]byte, []int) { + return file_service_message_receiver_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *UpdateMessageReceiversRequest_RecipientOptions) GetRecipientOptions() []*UpdateMessageReceiversRequest_RecipientOption { + if x != nil { + return x.RecipientOptions + } + return nil +} + +var File_service_message_receiver_proto protoreflect.FileDescriptor + +var file_service_message_receiver_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, + 0x04, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x63, 0x0a, 0x10, 0x72, 0x65, + 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, + 0x77, 0x0a, 0x15, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7b, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x64, 0x1a, 0x71, 0x0a, 0x10, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7a, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, + 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, + 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x22, 0x4c, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x32, 0x94, 0x02, 0x0a, 0x16, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x62, + 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x49, 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_message_receiver_proto_rawDescOnce sync.Once + file_service_message_receiver_proto_rawDescData = file_service_message_receiver_proto_rawDesc +) + +func file_service_message_receiver_proto_rawDescGZIP() []byte { + file_service_message_receiver_proto_rawDescOnce.Do(func() { + file_service_message_receiver_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_message_receiver_proto_rawDescData) + }) + return file_service_message_receiver_proto_rawDescData +} + +var file_service_message_receiver_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_service_message_receiver_proto_goTypes = []interface{}{ + (*UpdateMessageReceiversRequest)(nil), // 0: pb.UpdateMessageReceiversRequest + (*FindAllMessageReceiversRequest)(nil), // 1: pb.FindAllMessageReceiversRequest + (*FindAllMessageReceiversResponse)(nil), // 2: pb.FindAllMessageReceiversResponse + (*DeleteMessageReceiverRequest)(nil), // 3: pb.DeleteMessageReceiverRequest + nil, // 4: pb.UpdateMessageReceiversRequest.RecipientOptionsEntry + (*UpdateMessageReceiversRequest_RecipientOption)(nil), // 5: pb.UpdateMessageReceiversRequest.RecipientOption + (*UpdateMessageReceiversRequest_RecipientOptions)(nil), // 6: pb.UpdateMessageReceiversRequest.RecipientOptions + (*MessageReceiver)(nil), // 7: pb.MessageReceiver + (*RPCSuccess)(nil), // 8: pb.RPCSuccess +} +var file_service_message_receiver_proto_depIdxs = []int32{ + 4, // 0: pb.UpdateMessageReceiversRequest.recipientOptions:type_name -> pb.UpdateMessageReceiversRequest.RecipientOptionsEntry + 7, // 1: pb.FindAllMessageReceiversResponse.messageReceivers:type_name -> pb.MessageReceiver + 6, // 2: pb.UpdateMessageReceiversRequest.RecipientOptionsEntry.value:type_name -> pb.UpdateMessageReceiversRequest.RecipientOptions + 5, // 3: pb.UpdateMessageReceiversRequest.RecipientOptions.recipientOptions:type_name -> pb.UpdateMessageReceiversRequest.RecipientOption + 0, // 4: pb.MessageReceiverService.updateMessageReceivers:input_type -> pb.UpdateMessageReceiversRequest + 1, // 5: pb.MessageReceiverService.findAllMessageReceivers:input_type -> pb.FindAllMessageReceiversRequest + 3, // 6: pb.MessageReceiverService.deleteMessageReceiver:input_type -> pb.DeleteMessageReceiverRequest + 8, // 7: pb.MessageReceiverService.updateMessageReceivers:output_type -> pb.RPCSuccess + 2, // 8: pb.MessageReceiverService.findAllMessageReceivers:output_type -> pb.FindAllMessageReceiversResponse + 8, // 9: pb.MessageReceiverService.deleteMessageReceiver:output_type -> pb.RPCSuccess + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_service_message_receiver_proto_init() } +func file_service_message_receiver_proto_init() { + if File_service_message_receiver_proto != nil { + return + } + file_models_message_receiver_proto_init() + file_models_rpc_messages_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_message_receiver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateMessageReceiversRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_message_receiver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllMessageReceiversRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_message_receiver_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllMessageReceiversResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_message_receiver_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteMessageReceiverRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_message_receiver_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateMessageReceiversRequest_RecipientOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_message_receiver_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateMessageReceiversRequest_RecipientOptions); 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_service_message_receiver_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_message_receiver_proto_goTypes, + DependencyIndexes: file_service_message_receiver_proto_depIdxs, + MessageInfos: file_service_message_receiver_proto_msgTypes, + }.Build() + File_service_message_receiver_proto = out.File + file_service_message_receiver_proto_rawDesc = nil + file_service_message_receiver_proto_goTypes = nil + file_service_message_receiver_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// MessageReceiverServiceClient is the client API for MessageReceiverService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MessageReceiverServiceClient interface { + // 修改接收者 + UpdateMessageReceivers(ctx context.Context, in *UpdateMessageReceiversRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 查找接收者 + FindAllMessageReceivers(ctx context.Context, in *FindAllMessageReceiversRequest, opts ...grpc.CallOption) (*FindAllMessageReceiversResponse, error) + // 删除接收者 + DeleteMessageReceiver(ctx context.Context, in *DeleteMessageReceiverRequest, opts ...grpc.CallOption) (*RPCSuccess, error) +} + +type messageReceiverServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMessageReceiverServiceClient(cc grpc.ClientConnInterface) MessageReceiverServiceClient { + return &messageReceiverServiceClient{cc} +} + +func (c *messageReceiverServiceClient) UpdateMessageReceivers(ctx context.Context, in *UpdateMessageReceiversRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.MessageReceiverService/updateMessageReceivers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageReceiverServiceClient) FindAllMessageReceivers(ctx context.Context, in *FindAllMessageReceiversRequest, opts ...grpc.CallOption) (*FindAllMessageReceiversResponse, error) { + out := new(FindAllMessageReceiversResponse) + err := c.cc.Invoke(ctx, "/pb.MessageReceiverService/findAllMessageReceivers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageReceiverServiceClient) DeleteMessageReceiver(ctx context.Context, in *DeleteMessageReceiverRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.MessageReceiverService/deleteMessageReceiver", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MessageReceiverServiceServer is the server API for MessageReceiverService service. +type MessageReceiverServiceServer interface { + // 修改接收者 + UpdateMessageReceivers(context.Context, *UpdateMessageReceiversRequest) (*RPCSuccess, error) + // 查找接收者 + FindAllMessageReceivers(context.Context, *FindAllMessageReceiversRequest) (*FindAllMessageReceiversResponse, error) + // 删除接收者 + DeleteMessageReceiver(context.Context, *DeleteMessageReceiverRequest) (*RPCSuccess, error) +} + +// UnimplementedMessageReceiverServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMessageReceiverServiceServer struct { +} + +func (*UnimplementedMessageReceiverServiceServer) UpdateMessageReceivers(context.Context, *UpdateMessageReceiversRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateMessageReceivers not implemented") +} +func (*UnimplementedMessageReceiverServiceServer) FindAllMessageReceivers(context.Context, *FindAllMessageReceiversRequest) (*FindAllMessageReceiversResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllMessageReceivers not implemented") +} +func (*UnimplementedMessageReceiverServiceServer) DeleteMessageReceiver(context.Context, *DeleteMessageReceiverRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMessageReceiver not implemented") +} + +func RegisterMessageReceiverServiceServer(s *grpc.Server, srv MessageReceiverServiceServer) { + s.RegisterService(&_MessageReceiverService_serviceDesc, srv) +} + +func _MessageReceiverService_UpdateMessageReceivers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateMessageReceiversRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageReceiverServiceServer).UpdateMessageReceivers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.MessageReceiverService/UpdateMessageReceivers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageReceiverServiceServer).UpdateMessageReceivers(ctx, req.(*UpdateMessageReceiversRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessageReceiverService_FindAllMessageReceivers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllMessageReceiversRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageReceiverServiceServer).FindAllMessageReceivers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.MessageReceiverService/FindAllMessageReceivers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageReceiverServiceServer).FindAllMessageReceivers(ctx, req.(*FindAllMessageReceiversRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessageReceiverService_DeleteMessageReceiver_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMessageReceiverRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageReceiverServiceServer).DeleteMessageReceiver(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.MessageReceiverService/DeleteMessageReceiver", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageReceiverServiceServer).DeleteMessageReceiver(ctx, req.(*DeleteMessageReceiverRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MessageReceiverService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.MessageReceiverService", + HandlerType: (*MessageReceiverServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "updateMessageReceivers", + Handler: _MessageReceiverService_UpdateMessageReceivers_Handler, + }, + { + MethodName: "findAllMessageReceivers", + Handler: _MessageReceiverService_FindAllMessageReceivers_Handler, + }, + { + MethodName: "deleteMessageReceiver", + Handler: _MessageReceiverService_DeleteMessageReceiver_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_message_receiver.proto", +} diff --git a/pkg/rpc/pb/service_message_recipient.pb.go b/pkg/rpc/pb/service_message_recipient.pb.go index ca9fe0a..e15adc6 100644 --- a/pkg/rpc/pb/service_message_recipient.pb.go +++ b/pkg/rpc/pb/service_message_recipient.pb.go @@ -35,11 +35,11 @@ type CreateMessageRecipientRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` - InstanceId int64 `protobuf:"varint,2,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - GroupIds []int64 `protobuf:"varint,3,rep,packed,name=groupIds,proto3" json:"groupIds,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - User string `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"` + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + MessageMediaInstanceId int64 `protobuf:"varint,2,opt,name=messageMediaInstanceId,proto3" json:"messageMediaInstanceId,omitempty"` + MessageRecipientGroupIds []int64 `protobuf:"varint,3,rep,packed,name=messageRecipientGroupIds,proto3" json:"messageRecipientGroupIds,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + User string `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"` } func (x *CreateMessageRecipientRequest) Reset() { @@ -81,16 +81,16 @@ func (x *CreateMessageRecipientRequest) GetAdminId() int64 { return 0 } -func (x *CreateMessageRecipientRequest) GetInstanceId() int64 { +func (x *CreateMessageRecipientRequest) GetMessageMediaInstanceId() int64 { if x != nil { - return x.InstanceId + return x.MessageMediaInstanceId } return 0 } -func (x *CreateMessageRecipientRequest) GetGroupIds() []int64 { +func (x *CreateMessageRecipientRequest) GetMessageRecipientGroupIds() []int64 { if x != nil { - return x.GroupIds + return x.MessageRecipientGroupIds } return nil } @@ -162,13 +162,13 @@ type UpdateMessageRecipientRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MessageRecipientId int64 `protobuf:"varint,1,opt,name=messageRecipientId,proto3" json:"messageRecipientId,omitempty"` - AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"` - InstanceId int64 `protobuf:"varint,3,opt,name=instanceId,proto3" json:"instanceId,omitempty"` - GroupIds []int64 `protobuf:"varint,4,rep,packed,name=groupIds,proto3" json:"groupIds,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - IsOn bool `protobuf:"varint,6,opt,name=isOn,proto3" json:"isOn,omitempty"` - User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"` + MessageRecipientId int64 `protobuf:"varint,1,opt,name=messageRecipientId,proto3" json:"messageRecipientId,omitempty"` + AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"` + MessageMediaInstanceId int64 `protobuf:"varint,3,opt,name=messageMediaInstanceId,proto3" json:"messageMediaInstanceId,omitempty"` + MessageRecipientGroupIds []int64 `protobuf:"varint,4,rep,packed,name=messageRecipientGroupIds,proto3" json:"messageRecipientGroupIds,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + IsOn bool `protobuf:"varint,6,opt,name=isOn,proto3" json:"isOn,omitempty"` + User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"` } func (x *UpdateMessageRecipientRequest) Reset() { @@ -217,16 +217,16 @@ func (x *UpdateMessageRecipientRequest) GetAdminId() int64 { return 0 } -func (x *UpdateMessageRecipientRequest) GetInstanceId() int64 { +func (x *UpdateMessageRecipientRequest) GetMessageMediaInstanceId() int64 { if x != nil { - return x.InstanceId + return x.MessageMediaInstanceId } return 0 } -func (x *UpdateMessageRecipientRequest) GetGroupIds() []int64 { +func (x *UpdateMessageRecipientRequest) GetMessageRecipientGroupIds() []int64 { if x != nil { - return x.GroupIds + return x.MessageRecipientGroupIds } return nil } @@ -306,10 +306,10 @@ type CountAllEnabledMessageRecipientsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` - MediaType string `protobuf:"bytes,2,opt,name=mediaType,proto3" json:"mediaType,omitempty"` - GroupId int64 `protobuf:"varint,3,opt,name=groupId,proto3" json:"groupId,omitempty"` - Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + MediaType string `protobuf:"bytes,2,opt,name=mediaType,proto3" json:"mediaType,omitempty"` + MessageRecipientGroupId int64 `protobuf:"varint,3,opt,name=messageRecipientGroupId,proto3" json:"messageRecipientGroupId,omitempty"` + Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` } func (x *CountAllEnabledMessageRecipientsRequest) Reset() { @@ -358,9 +358,9 @@ func (x *CountAllEnabledMessageRecipientsRequest) GetMediaType() string { return "" } -func (x *CountAllEnabledMessageRecipientsRequest) GetGroupId() int64 { +func (x *CountAllEnabledMessageRecipientsRequest) GetMessageRecipientGroupId() int64 { if x != nil { - return x.GroupId + return x.MessageRecipientGroupId } return 0 } @@ -378,12 +378,12 @@ type ListEnabledMessageRecipientsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` - MediaType string `protobuf:"bytes,2,opt,name=mediaType,proto3" json:"mediaType,omitempty"` - GroupId int64 `protobuf:"varint,3,opt,name=groupId,proto3" json:"groupId,omitempty"` - Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` - Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` + AdminId int64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` + MediaType string `protobuf:"bytes,2,opt,name=mediaType,proto3" json:"mediaType,omitempty"` + MessageRecipientGroupId int64 `protobuf:"varint,3,opt,name=messageRecipientGroupId,proto3" json:"messageRecipientGroupId,omitempty"` + Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` + Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` } func (x *ListEnabledMessageRecipientsRequest) Reset() { @@ -432,9 +432,9 @@ func (x *ListEnabledMessageRecipientsRequest) GetMediaType() string { return "" } -func (x *ListEnabledMessageRecipientsRequest) GetGroupId() int64 { +func (x *ListEnabledMessageRecipientsRequest) GetMessageRecipientGroupId() int64 { if x != nil { - return x.GroupId + return x.MessageRecipientGroupId } return 0 } @@ -611,33 +611,40 @@ var file_service_message_recipient_proto_rawDesc = []byte{ 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xab, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x22, 0xe3, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x50, - 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x65, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x16, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xa7, 0x02, 0x0a, 0x1d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, - 0x22, 0xef, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, - 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, + 0x65, 0x64, 0x69, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x65, 0x64, + 0x69, 0x61, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x18, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, @@ -647,23 +654,27 @@ var file_service_message_recipient_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x27, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x74, 0x49, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x27, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xbd, 0x01, 0x0a, 0x23, + 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x72, + 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, diff --git a/pkg/rpc/protos/models/message_receiver.proto b/pkg/rpc/protos/models/message_receiver.proto new file mode 100644 index 0000000..e60a68e --- /dev/null +++ b/pkg/rpc/protos/models/message_receiver.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "models/message_recipient.proto"; +import "models/message_recipient_group.proto"; + +message MessageReceiver { + int64 id = 1; + int64 clusterId = 2; + int64 nodeId = 3; + int64 serverId = 4; + string type = 5; + bytes paramsJSON = 6; + MessageRecipient messageRecipient = 7; + MessageRecipientGroup messageRecipientGroup = 8; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_message_receiver.proto b/pkg/rpc/protos/service_message_receiver.proto new file mode 100644 index 0000000..951c496 --- /dev/null +++ b/pkg/rpc/protos/service_message_receiver.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "models/message_receiver.proto"; +import "models/rpc_messages.proto"; + +// 消息对象接收者设置 +service MessageReceiverService { + // 修改接收者 + rpc updateMessageReceivers (UpdateMessageReceiversRequest) returns (RPCSuccess); + + // 查找接收者 + rpc findAllMessageReceivers (FindAllMessageReceiversRequest) returns (FindAllMessageReceiversResponse); + + // 删除接收者 + rpc deleteMessageReceiver (DeleteMessageReceiverRequest) returns (RPCSuccess); +} + +// 修改接收者 +message UpdateMessageReceiversRequest { + int64 nodeClusterId = 1; + int64 nodeId = 2; + int64 serverId = 3; + bytes paramsJSON = 5; + map recipientOptions = 6; // type => options + + message RecipientOption { + int64 messageRecipientId = 1; + int64 messageRecipientGroupId = 2; + } + + message RecipientOptions { + repeated RecipientOption recipientOptions = 1; + } +} + +// 查找接收者 +message FindAllMessageReceiversRequest { + int64 nodeClusterId = 1; + int64 nodeId = 2; + int64 serverId = 3; +} + +message FindAllMessageReceiversResponse { + repeated MessageReceiver messageReceivers = 1; +} + +// 删除接收者 +message DeleteMessageReceiverRequest { + int64 messageReceiverId = 1; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_message_recipient.proto b/pkg/rpc/protos/service_message_recipient.proto index 9946c8e..2f455b6 100644 --- a/pkg/rpc/protos/service_message_recipient.proto +++ b/pkg/rpc/protos/service_message_recipient.proto @@ -30,8 +30,8 @@ service MessageRecipientService { // 创建接收人 message CreateMessageRecipientRequest { int64 adminId = 1; - int64 instanceId = 2; - repeated int64 groupIds = 3; + int64 messageMediaInstanceId = 2; + repeated int64 messageRecipientGroupIds = 3; string description = 4; string user = 5; } @@ -44,8 +44,8 @@ message CreateMessageRecipientResponse { message UpdateMessageRecipientRequest { int64 messageRecipientId = 1; int64 adminId = 2; - int64 instanceId = 3; - repeated int64 groupIds = 4; + int64 messageMediaInstanceId = 3; + repeated int64 messageRecipientGroupIds = 4; string description = 5; bool isOn = 6; string user = 7; @@ -60,7 +60,7 @@ message DeleteMessageRecipientRequest { message CountAllEnabledMessageRecipientsRequest { int64 adminId = 1; string mediaType = 2; - int64 groupId = 3; + int64 messageRecipientGroupId = 3; string keyword = 4; } @@ -68,7 +68,7 @@ message CountAllEnabledMessageRecipientsRequest { message ListEnabledMessageRecipientsRequest { int64 adminId = 1; string mediaType = 2; - int64 groupId = 3; + int64 messageRecipientGroupId = 3; string keyword = 4; int64 offset = 5; int64 size = 6;