Browse Source

update

master
jaydan 10 months ago
parent
commit
82129e6cd5
  1. 178
      timer_task/v1/timer_task.pb.go
  2. 6
      timer_task/v1/timer_task.proto
  3. 38
      timer_task/v1/timer_task_grpc.pb.go

178
timer_task/v1/timer_task.pb.go

@ -21,6 +21,53 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type BatchCreateTimerTaskReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Items []*CreateTimerTaskReq `protobuf:"bytes,1,rep,name=items,proto3" json:"items"`
}
func (x *BatchCreateTimerTaskReq) Reset() {
*x = BatchCreateTimerTaskReq{}
if protoimpl.UnsafeEnabled {
mi := &file_timer_task_v1_timer_task_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchCreateTimerTaskReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchCreateTimerTaskReq) ProtoMessage() {}
func (x *BatchCreateTimerTaskReq) ProtoReflect() protoreflect.Message {
mi := &file_timer_task_v1_timer_task_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 BatchCreateTimerTaskReq.ProtoReflect.Descriptor instead.
func (*BatchCreateTimerTaskReq) Descriptor() ([]byte, []int) {
return file_timer_task_v1_timer_task_proto_rawDescGZIP(), []int{0}
}
func (x *BatchCreateTimerTaskReq) GetItems() []*CreateTimerTaskReq {
if x != nil {
return x.Items
}
return nil
}
type CreateTimerTaskReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -36,7 +83,7 @@ type CreateTimerTaskReq struct {
func (x *CreateTimerTaskReq) Reset() {
*x = CreateTimerTaskReq{}
if protoimpl.UnsafeEnabled {
mi := &file_timer_task_v1_timer_task_proto_msgTypes[0]
mi := &file_timer_task_v1_timer_task_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -49,7 +96,7 @@ func (x *CreateTimerTaskReq) String() string {
func (*CreateTimerTaskReq) ProtoMessage() {}
func (x *CreateTimerTaskReq) ProtoReflect() protoreflect.Message {
mi := &file_timer_task_v1_timer_task_proto_msgTypes[0]
mi := &file_timer_task_v1_timer_task_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -62,7 +109,7 @@ func (x *CreateTimerTaskReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateTimerTaskReq.ProtoReflect.Descriptor instead.
func (*CreateTimerTaskReq) Descriptor() ([]byte, []int) {
return file_timer_task_v1_timer_task_proto_rawDescGZIP(), []int{0}
return file_timer_task_v1_timer_task_proto_rawDescGZIP(), []int{1}
}
func (x *CreateTimerTaskReq) GetType() int32 {
@ -104,7 +151,7 @@ type DeleteTimerTaskByAssociationIdReq struct {
func (x *DeleteTimerTaskByAssociationIdReq) Reset() {
*x = DeleteTimerTaskByAssociationIdReq{}
if protoimpl.UnsafeEnabled {
mi := &file_timer_task_v1_timer_task_proto_msgTypes[1]
mi := &file_timer_task_v1_timer_task_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -117,7 +164,7 @@ func (x *DeleteTimerTaskByAssociationIdReq) String() string {
func (*DeleteTimerTaskByAssociationIdReq) ProtoMessage() {}
func (x *DeleteTimerTaskByAssociationIdReq) ProtoReflect() protoreflect.Message {
mi := &file_timer_task_v1_timer_task_proto_msgTypes[1]
mi := &file_timer_task_v1_timer_task_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -130,7 +177,7 @@ func (x *DeleteTimerTaskByAssociationIdReq) ProtoReflect() protoreflect.Message
// Deprecated: Use DeleteTimerTaskByAssociationIdReq.ProtoReflect.Descriptor instead.
func (*DeleteTimerTaskByAssociationIdReq) Descriptor() ([]byte, []int) {
return file_timer_task_v1_timer_task_proto_rawDescGZIP(), []int{1}
return file_timer_task_v1_timer_task_proto_rawDescGZIP(), []int{2}
}
func (x *DeleteTimerTaskByAssociationIdReq) GetAssociationId() int64 {
@ -147,39 +194,50 @@ var file_timer_task_v1_timer_task_proto_rawDesc = []byte{
0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x76, 0x31, 0x1a,
0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x73, 0x73, 0x6f, 0x63,
0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0d, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d,
0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41, 0x74, 0x22, 0x4a, 0x0a,
0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b,
0x42, 0x79, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52,
0x65, 0x71, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x73, 0x73, 0x6f,
0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xdd, 0x01, 0x0a, 0x09, 0x54, 0x69,
0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21, 0x2e, 0x74, 0x69, 0x6d,
0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x12, 0x76, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12,
0x37, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21,
0x2e, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
0x71, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12,
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61,
0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5f, 0x61, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x41,
0x74, 0x22, 0x4a, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72,
0x54, 0x61, 0x73, 0x6b, 0x42, 0x79, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b,
0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54,
0x61, 0x73, 0x6b, 0x42, 0x79, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x63, 0x68, 0x61, 0x74,
0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d,
0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xc1, 0x02,
0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x0f, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x21,
0x2e, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x62, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x26, 0x2e,
0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61,
0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61,
0x73, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x63, 0x68, 0x61, 0x74,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74,
0x2e, 0x67, 0x7a, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x6a, 0x75, 0x6d,
0x61, 0x69, 0x79, 0x78, 0x2e, 0x63, 0x6e, 0x2f, 0x6a, 0x6d, 0x2f, 0x6a, 0x6d, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x76, 0x31,
0x3b, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x76, 0x0a, 0x1e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x79, 0x41, 0x73,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x30, 0x2e, 0x74, 0x69,
0x6d, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x79, 0x41, 0x73, 0x73,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x67, 0x7a, 0x2e, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x6a, 0x75, 0x6d, 0x61, 0x69, 0x79, 0x78, 0x2e, 0x63, 0x6e, 0x2f,
0x6a, 0x6d, 0x2f, 0x6a, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x72,
0x5f, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x54, 0x61,
0x73, 0x6b, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -194,22 +252,26 @@ func file_timer_task_v1_timer_task_proto_rawDescGZIP() []byte {
return file_timer_task_v1_timer_task_proto_rawDescData
}
var file_timer_task_v1_timer_task_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_timer_task_v1_timer_task_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_timer_task_v1_timer_task_proto_goTypes = []interface{}{
(*CreateTimerTaskReq)(nil), // 0: timer_task.v1.CreateTimerTaskReq
(*DeleteTimerTaskByAssociationIdReq)(nil), // 1: timer_task.v1.DeleteTimerTaskByAssociationIdReq
(*common.Empty)(nil), // 2: metachat.api.service.common.Empty
(*BatchCreateTimerTaskReq)(nil), // 0: timer_task.v1.BatchCreateTimerTaskReq
(*CreateTimerTaskReq)(nil), // 1: timer_task.v1.CreateTimerTaskReq
(*DeleteTimerTaskByAssociationIdReq)(nil), // 2: timer_task.v1.DeleteTimerTaskByAssociationIdReq
(*common.Empty)(nil), // 3: metachat.api.service.common.Empty
}
var file_timer_task_v1_timer_task_proto_depIdxs = []int32{
0, // 0: timer_task.v1.TimerTask.CreateTimerTask:input_type -> timer_task.v1.CreateTimerTaskReq
1, // 1: timer_task.v1.TimerTask.DeleteTimerTaskByAssociationId:input_type -> timer_task.v1.DeleteTimerTaskByAssociationIdReq
2, // 2: timer_task.v1.TimerTask.CreateTimerTask:output_type -> metachat.api.service.common.Empty
2, // 3: timer_task.v1.TimerTask.DeleteTimerTaskByAssociationId:output_type -> metachat.api.service.common.Empty
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
1, // 0: timer_task.v1.BatchCreateTimerTaskReq.items:type_name -> timer_task.v1.CreateTimerTaskReq
1, // 1: timer_task.v1.TimerTask.CreateTimerTask:input_type -> timer_task.v1.CreateTimerTaskReq
0, // 2: timer_task.v1.TimerTask.BatchCreateTimerTask:input_type -> timer_task.v1.BatchCreateTimerTaskReq
2, // 3: timer_task.v1.TimerTask.DeleteTimerTaskByAssociationId:input_type -> timer_task.v1.DeleteTimerTaskByAssociationIdReq
3, // 4: timer_task.v1.TimerTask.CreateTimerTask:output_type -> metachat.api.service.common.Empty
3, // 5: timer_task.v1.TimerTask.BatchCreateTimerTask:output_type -> metachat.api.service.common.Empty
3, // 6: timer_task.v1.TimerTask.DeleteTimerTaskByAssociationId:output_type -> metachat.api.service.common.Empty
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_timer_task_v1_timer_task_proto_init() }
@ -219,7 +281,7 @@ func file_timer_task_v1_timer_task_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_timer_task_v1_timer_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateTimerTaskReq); i {
switch v := v.(*BatchCreateTimerTaskReq); i {
case 0:
return &v.state
case 1:
@ -231,6 +293,18 @@ func file_timer_task_v1_timer_task_proto_init() {
}
}
file_timer_task_v1_timer_task_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateTimerTaskReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_timer_task_v1_timer_task_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteTimerTaskByAssociationIdReq); i {
case 0:
return &v.state
@ -249,7 +323,7 @@ func file_timer_task_v1_timer_task_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_timer_task_v1_timer_task_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},

6
timer_task/v1/timer_task.proto

@ -9,10 +9,16 @@ import "common/common.proto";
service TimerTask {
//
rpc CreateTimerTask(CreateTimerTaskReq) returns (metachat.api.service.common.Empty);
//
rpc BatchCreateTimerTask(BatchCreateTimerTaskReq) returns (metachat.api.service.common.Empty);
// id
rpc DeleteTimerTaskByAssociationId(DeleteTimerTaskByAssociationIdReq) returns (metachat.api.service.common.Empty);
}
message BatchCreateTimerTaskReq {
repeated CreateTimerTaskReq items = 1;
}
message CreateTimerTaskReq {
// 12退34广5广
int32 type = 1;

38
timer_task/v1/timer_task_grpc.pb.go

@ -25,6 +25,8 @@ const _ = grpc.SupportPackageIsVersion7
type TimerTaskClient interface {
// 创建定时任务
CreateTimerTask(ctx context.Context, in *CreateTimerTaskReq, opts ...grpc.CallOption) (*common.Empty, error)
// 创建定时任务
BatchCreateTimerTask(ctx context.Context, in *BatchCreateTimerTaskReq, opts ...grpc.CallOption) (*common.Empty, error)
// 删除定时任务,根据关联id
DeleteTimerTaskByAssociationId(ctx context.Context, in *DeleteTimerTaskByAssociationIdReq, opts ...grpc.CallOption) (*common.Empty, error)
}
@ -46,6 +48,15 @@ func (c *timerTaskClient) CreateTimerTask(ctx context.Context, in *CreateTimerTa
return out, nil
}
func (c *timerTaskClient) BatchCreateTimerTask(ctx context.Context, in *BatchCreateTimerTaskReq, opts ...grpc.CallOption) (*common.Empty, error) {
out := new(common.Empty)
err := c.cc.Invoke(ctx, "/timer_task.v1.TimerTask/BatchCreateTimerTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *timerTaskClient) DeleteTimerTaskByAssociationId(ctx context.Context, in *DeleteTimerTaskByAssociationIdReq, opts ...grpc.CallOption) (*common.Empty, error) {
out := new(common.Empty)
err := c.cc.Invoke(ctx, "/timer_task.v1.TimerTask/DeleteTimerTaskByAssociationId", in, out, opts...)
@ -61,6 +72,8 @@ func (c *timerTaskClient) DeleteTimerTaskByAssociationId(ctx context.Context, in
type TimerTaskServer interface {
// 创建定时任务
CreateTimerTask(context.Context, *CreateTimerTaskReq) (*common.Empty, error)
// 创建定时任务
BatchCreateTimerTask(context.Context, *BatchCreateTimerTaskReq) (*common.Empty, error)
// 删除定时任务,根据关联id
DeleteTimerTaskByAssociationId(context.Context, *DeleteTimerTaskByAssociationIdReq) (*common.Empty, error)
mustEmbedUnimplementedTimerTaskServer()
@ -73,6 +86,9 @@ type UnimplementedTimerTaskServer struct {
func (UnimplementedTimerTaskServer) CreateTimerTask(context.Context, *CreateTimerTaskReq) (*common.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateTimerTask not implemented")
}
func (UnimplementedTimerTaskServer) BatchCreateTimerTask(context.Context, *BatchCreateTimerTaskReq) (*common.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchCreateTimerTask not implemented")
}
func (UnimplementedTimerTaskServer) DeleteTimerTaskByAssociationId(context.Context, *DeleteTimerTaskByAssociationIdReq) (*common.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTimerTaskByAssociationId not implemented")
}
@ -107,6 +123,24 @@ func _TimerTask_CreateTimerTask_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _TimerTask_BatchCreateTimerTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchCreateTimerTaskReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TimerTaskServer).BatchCreateTimerTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/timer_task.v1.TimerTask/BatchCreateTimerTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TimerTaskServer).BatchCreateTimerTask(ctx, req.(*BatchCreateTimerTaskReq))
}
return interceptor(ctx, in, info, handler)
}
func _TimerTask_DeleteTimerTaskByAssociationId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteTimerTaskByAssociationIdReq)
if err := dec(in); err != nil {
@ -136,6 +170,10 @@ var TimerTask_ServiceDesc = grpc.ServiceDesc{
MethodName: "CreateTimerTask",
Handler: _TimerTask_CreateTimerTask_Handler,
},
{
MethodName: "BatchCreateTimerTask",
Handler: _TimerTask_BatchCreateTimerTask_Handler,
},
{
MethodName: "DeleteTimerTaskByAssociationId",
Handler: _TimerTask_DeleteTimerTaskByAssociationId_Handler,

Loading…
Cancel
Save