diff --git a/api/emailAlerts/emailAlerts.pb.go b/api/emailAlerts/emailAlerts.pb.go new file mode 100644 index 0000000..8fccfe3 --- /dev/null +++ b/api/emailAlerts/emailAlerts.pb.go @@ -0,0 +1,644 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc v5.26.0 +// source: api/emailAlerts/emailAlerts.proto + +package emailAlerts + +import ( + 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 EmailAlertsSubmitReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName"` + LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"` + Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"` + Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"` +} + +func (x *EmailAlertsSubmitReq) Reset() { + *x = EmailAlertsSubmitReq{} + if protoimpl.UnsafeEnabled { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailAlertsSubmitReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailAlertsSubmitReq) ProtoMessage() {} + +func (x *EmailAlertsSubmitReq) ProtoReflect() protoreflect.Message { + mi := &file_api_emailAlerts_emailAlerts_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 EmailAlertsSubmitReq.ProtoReflect.Descriptor instead. +func (*EmailAlertsSubmitReq) Descriptor() ([]byte, []int) { + return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{0} +} + +func (x *EmailAlertsSubmitReq) GetFirstName() string { + if x != nil { + return x.FirstName + } + return "" +} + +func (x *EmailAlertsSubmitReq) GetLastName() string { + if x != nil { + return x.LastName + } + return "" +} + +func (x *EmailAlertsSubmitReq) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *EmailAlertsSubmitReq) GetCompany() string { + if x != nil { + return x.Company + } + return "" +} + +func (x *EmailAlertsSubmitReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +type EmailAlertsSubmitResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` +} + +func (x *EmailAlertsSubmitResp) Reset() { + *x = EmailAlertsSubmitResp{} + if protoimpl.UnsafeEnabled { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailAlertsSubmitResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailAlertsSubmitResp) ProtoMessage() {} + +func (x *EmailAlertsSubmitResp) ProtoReflect() protoreflect.Message { + mi := &file_api_emailAlerts_emailAlerts_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 EmailAlertsSubmitResp.ProtoReflect.Descriptor instead. +func (*EmailAlertsSubmitResp) Descriptor() ([]byte, []int) { + return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{1} +} + +func (x *EmailAlertsSubmitResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +// ========================= EmailInformatio ============================== +type Filtrate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email"` + Company string `protobuf:"bytes,3,opt,name=company,proto3" json:"company"` +} + +func (x *Filtrate) Reset() { + *x = Filtrate{} + if protoimpl.UnsafeEnabled { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filtrate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filtrate) ProtoMessage() {} + +func (x *Filtrate) ProtoReflect() protoreflect.Message { + mi := &file_api_emailAlerts_emailAlerts_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 Filtrate.ProtoReflect.Descriptor instead. +func (*Filtrate) Descriptor() ([]byte, []int) { + return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{2} +} + +func (x *Filtrate) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Filtrate) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Filtrate) GetCompany() string { + if x != nil { + return x.Company + } + return "" +} + +type GetEmailInformationListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"` + PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"` + Filtrate *Filtrate `protobuf:"bytes,3,opt,name=filtrate,proto3" json:"filtrate"` +} + +func (x *GetEmailInformationListReq) Reset() { + *x = GetEmailInformationListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEmailInformationListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEmailInformationListReq) ProtoMessage() {} + +func (x *GetEmailInformationListReq) ProtoReflect() protoreflect.Message { + mi := &file_api_emailAlerts_emailAlerts_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 GetEmailInformationListReq.ProtoReflect.Descriptor instead. +func (*GetEmailInformationListReq) Descriptor() ([]byte, []int) { + return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{3} +} + +func (x *GetEmailInformationListReq) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GetEmailInformationListReq) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *GetEmailInformationListReq) GetFiltrate() *Filtrate { + if x != nil { + return x.Filtrate + } + return nil +} + +type GetEmailInformationListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page"` + PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize"` + Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total"` + Data []*EmailInformation `protobuf:"bytes,5,rep,name=data,proto3" json:"data"` +} + +func (x *GetEmailInformationListResp) Reset() { + *x = GetEmailInformationListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEmailInformationListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEmailInformationListResp) ProtoMessage() {} + +func (x *GetEmailInformationListResp) ProtoReflect() protoreflect.Message { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4] + 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 GetEmailInformationListResp.ProtoReflect.Descriptor instead. +func (*GetEmailInformationListResp) Descriptor() ([]byte, []int) { + return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{4} +} + +func (x *GetEmailInformationListResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *GetEmailInformationListResp) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GetEmailInformationListResp) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *GetEmailInformationListResp) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *GetEmailInformationListResp) GetData() []*EmailInformation { + if x != nil { + return x.Data + } + return nil +} + +type EmailInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"` + Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"` + Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"` + CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt"` +} + +func (x *EmailInformation) Reset() { + *x = EmailInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EmailInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailInformation) ProtoMessage() {} + +func (x *EmailInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_emailAlerts_emailAlerts_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 EmailInformation.ProtoReflect.Descriptor instead. +func (*EmailInformation) Descriptor() ([]byte, []int) { + return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{5} +} + +func (x *EmailInformation) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *EmailInformation) GetFullName() string { + if x != nil { + return x.FullName + } + return "" +} + +func (x *EmailInformation) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *EmailInformation) GetCompany() string { + if x != nil { + return x.Company + } + return "" +} + +func (x *EmailInformation) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *EmailInformation) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +var File_api_emailAlerts_emailAlerts_proto protoreflect.FileDescriptor + +var file_api_emailAlerts_emailAlerts_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, + 0x73, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, + 0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, + 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6d, 0x73, 0x67, 0x22, 0x4e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, + 0x70, 0x61, 0x6e, 0x79, 0x22, 0x7f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x31, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xd7, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, + 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, + 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x2e, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, + 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, + 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x3b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_api_emailAlerts_emailAlerts_proto_rawDescOnce sync.Once + file_api_emailAlerts_emailAlerts_proto_rawDescData = file_api_emailAlerts_emailAlerts_proto_rawDesc +) + +func file_api_emailAlerts_emailAlerts_proto_rawDescGZIP() []byte { + file_api_emailAlerts_emailAlerts_proto_rawDescOnce.Do(func() { + file_api_emailAlerts_emailAlerts_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_emailAlerts_emailAlerts_proto_rawDescData) + }) + return file_api_emailAlerts_emailAlerts_proto_rawDescData +} + +var file_api_emailAlerts_emailAlerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_api_emailAlerts_emailAlerts_proto_goTypes = []interface{}{ + (*EmailAlertsSubmitReq)(nil), // 0: emailAlerts.EmailAlertsSubmitReq + (*EmailAlertsSubmitResp)(nil), // 1: emailAlerts.EmailAlertsSubmitResp + (*Filtrate)(nil), // 2: emailAlerts.Filtrate + (*GetEmailInformationListReq)(nil), // 3: emailAlerts.GetEmailInformationListReq + (*GetEmailInformationListResp)(nil), // 4: emailAlerts.GetEmailInformationListResp + (*EmailInformation)(nil), // 5: emailAlerts.EmailInformation +} +var file_api_emailAlerts_emailAlerts_proto_depIdxs = []int32{ + 2, // 0: emailAlerts.GetEmailInformationListReq.filtrate:type_name -> emailAlerts.Filtrate + 5, // 1: emailAlerts.GetEmailInformationListResp.data:type_name -> emailAlerts.EmailInformation + 0, // 2: emailAlerts.EmailAlerts.EmailAlertsSubmit:input_type -> emailAlerts.EmailAlertsSubmitReq + 3, // 3: emailAlerts.EmailAlerts.GetEmailInformationList:input_type -> emailAlerts.GetEmailInformationListReq + 1, // 4: emailAlerts.EmailAlerts.EmailAlertsSubmit:output_type -> emailAlerts.EmailAlertsSubmitResp + 4, // 5: emailAlerts.EmailAlerts.GetEmailInformationList:output_type -> emailAlerts.GetEmailInformationListResp + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] 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_api_emailAlerts_emailAlerts_proto_init() } +func file_api_emailAlerts_emailAlerts_proto_init() { + if File_api_emailAlerts_emailAlerts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_emailAlerts_emailAlerts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailAlertsSubmitReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_emailAlerts_emailAlerts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailAlertsSubmitResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_emailAlerts_emailAlerts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Filtrate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_emailAlerts_emailAlerts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEmailInformationListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_emailAlerts_emailAlerts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEmailInformationListResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_emailAlerts_emailAlerts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EmailInformation); 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_api_emailAlerts_emailAlerts_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_emailAlerts_emailAlerts_proto_goTypes, + DependencyIndexes: file_api_emailAlerts_emailAlerts_proto_depIdxs, + MessageInfos: file_api_emailAlerts_emailAlerts_proto_msgTypes, + }.Build() + File_api_emailAlerts_emailAlerts_proto = out.File + file_api_emailAlerts_emailAlerts_proto_rawDesc = nil + file_api_emailAlerts_emailAlerts_proto_goTypes = nil + file_api_emailAlerts_emailAlerts_proto_depIdxs = nil +} diff --git a/api/emailAlerts/emailAlerts.validator.pb.go b/api/emailAlerts/emailAlerts.validator.pb.go new file mode 100644 index 0000000..4f738bf --- /dev/null +++ b/api/emailAlerts/emailAlerts.validator.pb.go @@ -0,0 +1,47 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: api/emailAlerts/emailAlerts.proto + +package emailAlerts + +import ( + fmt "fmt" + math "math" + proto "github.com/golang/protobuf/proto" + github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (this *EmailAlertsSubmitReq) Validate() error { + return nil +} +func (this *EmailAlertsSubmitResp) Validate() error { + return nil +} +func (this *Filtrate) Validate() error { + return nil +} +func (this *GetEmailInformationListReq) Validate() error { + if this.Filtrate != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err) + } + } + return nil +} +func (this *GetEmailInformationListResp) Validate() error { + for _, item := range this.Data { + if item != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Data", err) + } + } + } + return nil +} +func (this *EmailInformation) Validate() error { + return nil +} diff --git a/api/emailAlerts/emailAlerts_triple.pb.go b/api/emailAlerts/emailAlerts_triple.pb.go new file mode 100644 index 0000000..03b8eb9 --- /dev/null +++ b/api/emailAlerts/emailAlerts_triple.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go-triple. DO NOT EDIT. +// versions: +// - protoc-gen-go-triple v1.0.5 +// - protoc v5.26.0 +// source: api/emailAlerts/emailAlerts.proto + +package emailAlerts + +import ( + context "context" + protocol "dubbo.apache.org/dubbo-go/v3/protocol" + dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3" + invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation" + grpc_go "github.com/dubbogo/grpc-go" + codes "github.com/dubbogo/grpc-go/codes" + metadata "github.com/dubbogo/grpc-go/metadata" + status "github.com/dubbogo/grpc-go/status" + common "github.com/dubbogo/triple/pkg/common" + constant "github.com/dubbogo/triple/pkg/common/constant" + triple "github.com/dubbogo/triple/pkg/triple" +) + +// 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_go.SupportPackageIsVersion7 + +// EmailAlertsClient is the client API for EmailAlerts 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 EmailAlertsClient interface { + EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) + // ========================= EmailInformatio ============================== + GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) +} + +type emailAlertsClient struct { + cc *triple.TripleConn +} + +type EmailAlertsClientImpl struct { + EmailAlertsSubmit func(ctx context.Context, in *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) + GetEmailInformationList func(ctx context.Context, in *GetEmailInformationListReq) (*GetEmailInformationListResp, error) +} + +func (c *EmailAlertsClientImpl) GetDubboStub(cc *triple.TripleConn) EmailAlertsClient { + return NewEmailAlertsClient(cc) +} + +func (c *EmailAlertsClientImpl) XXX_InterfaceName() string { + return "emailAlerts.EmailAlerts" +} + +func NewEmailAlertsClient(cc *triple.TripleConn) EmailAlertsClient { + return &emailAlertsClient{cc} +} + +func (c *emailAlertsClient) EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) { + out := new(EmailAlertsSubmitResp) + interfaceKey := ctx.Value(constant.InterfaceKey).(string) + return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EmailAlertsSubmit", in, out) +} + +func (c *emailAlertsClient) GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) { + out := new(GetEmailInformationListResp) + interfaceKey := ctx.Value(constant.InterfaceKey).(string) + return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetEmailInformationList", in, out) +} + +// EmailAlertsServer is the server API for EmailAlerts service. +// All implementations must embed UnimplementedEmailAlertsServer +// for forward compatibility +type EmailAlertsServer interface { + EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) + // ========================= EmailInformatio ============================== + GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) + mustEmbedUnimplementedEmailAlertsServer() +} + +// UnimplementedEmailAlertsServer must be embedded to have forward compatible implementations. +type UnimplementedEmailAlertsServer struct { + proxyImpl protocol.Invoker +} + +func (UnimplementedEmailAlertsServer) EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method EmailAlertsSubmit not implemented") +} +func (UnimplementedEmailAlertsServer) GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEmailInformationList not implemented") +} +func (s *UnimplementedEmailAlertsServer) XXX_SetProxyImpl(impl protocol.Invoker) { + s.proxyImpl = impl +} + +func (s *UnimplementedEmailAlertsServer) XXX_GetProxyImpl() protocol.Invoker { + return s.proxyImpl +} + +func (s *UnimplementedEmailAlertsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc { + return &EmailAlerts_ServiceDesc +} +func (s *UnimplementedEmailAlertsServer) XXX_InterfaceName() string { + return "emailAlerts.EmailAlerts" +} + +func (UnimplementedEmailAlertsServer) mustEmbedUnimplementedEmailAlertsServer() {} + +// UnsafeEmailAlertsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EmailAlertsServer will +// result in compilation errors. +type UnsafeEmailAlertsServer interface { + mustEmbedUnimplementedEmailAlertsServer() +} + +func RegisterEmailAlertsServer(s grpc_go.ServiceRegistrar, srv EmailAlertsServer) { + s.RegisterService(&EmailAlerts_ServiceDesc, srv) +} + +func _EmailAlerts_EmailAlertsSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { + in := new(EmailAlertsSubmitReq) + if err := dec(in); err != nil { + return nil, err + } + base := srv.(dubbo3.Dubbo3GrpcService) + args := []interface{}{} + args = append(args, in) + md, _ := metadata.FromIncomingContext(ctx) + invAttachment := make(map[string]interface{}, len(md)) + for k, v := range md { + invAttachment[k] = v + } + invo := invocation.NewRPCInvocation("EmailAlertsSubmit", args, invAttachment) + if interceptor == nil { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + info := &grpc_go.UnaryServerInfo{ + Server: srv, + FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + return interceptor(ctx, in, info, handler) +} + +func _EmailAlerts_GetEmailInformationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEmailInformationListReq) + if err := dec(in); err != nil { + return nil, err + } + base := srv.(dubbo3.Dubbo3GrpcService) + args := []interface{}{} + args = append(args, in) + md, _ := metadata.FromIncomingContext(ctx) + invAttachment := make(map[string]interface{}, len(md)) + for k, v := range md { + invAttachment[k] = v + } + invo := invocation.NewRPCInvocation("GetEmailInformationList", args, invAttachment) + if interceptor == nil { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + info := &grpc_go.UnaryServerInfo{ + Server: srv, + FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + return interceptor(ctx, in, info, handler) +} + +// EmailAlerts_ServiceDesc is the grpc_go.ServiceDesc for EmailAlerts service. +// It's only intended for direct use with grpc_go.RegisterService, +// and not to be introspected or modified (even as a copy) +var EmailAlerts_ServiceDesc = grpc_go.ServiceDesc{ + ServiceName: "emailAlerts.EmailAlerts", + HandlerType: (*EmailAlertsServer)(nil), + Methods: []grpc_go.MethodDesc{ + { + MethodName: "EmailAlertsSubmit", + Handler: _EmailAlerts_EmailAlertsSubmit_Handler, + }, + { + MethodName: "GetEmailInformationList", + Handler: _EmailAlerts_GetEmailInformationList_Handler, + }, + }, + Streams: []grpc_go.StreamDesc{}, + Metadata: "api/emailAlerts/emailAlerts.proto", +} diff --git a/pkg/router/router.go b/pkg/router/router.go index e78957a..c4bdc39 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -7,6 +7,7 @@ import ( "fonchain-fiee/pkg/service/account" "fonchain-fiee/pkg/service/asChat" "fonchain-fiee/pkg/service/auth" + emailAlert "fonchain-fiee/pkg/service/emailAlerts" "fonchain-fiee/pkg/service/file" "fonchain-fiee/pkg/service/governance" imports "fonchain-fiee/pkg/service/import" @@ -203,6 +204,14 @@ func NewRouter() *gin.Engine { reportsRouteLogin.POST("/quarterly/delete", reports.QuarterlyReportDelete) reportsRouteLogin.POST("/quarterly/edit", reports.QuarterlyReportEdit) } + { + // 邮箱通知 + emailAlertsRoute := v1.Group("/emailalerts") + emailAlertsRouteLogin := emailAlertsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider)) + + emailAlertsRouteLogin.POST("/submit", emailAlert.EmailAlertSubmit) + emailAlertsRouteLogin.POST("/list", emailAlert.GetEmailInformationList) + } { importRoute := v1.Group("/import") importRoute.Use(middleware.CheckWebLogin(service.AccountProvider)) diff --git a/pkg/service/emailAlerts/emailAlerts.go b/pkg/service/emailAlerts/emailAlerts.go new file mode 100644 index 0000000..2ef9756 --- /dev/null +++ b/pkg/service/emailAlerts/emailAlerts.go @@ -0,0 +1,36 @@ +package emailalerts + +import ( + "fonchain-fiee/api/emailAlerts" + "fonchain-fiee/pkg/service" + + "github.com/gin-gonic/gin" +) + +func EmailAlertSubmit(ctx *gin.Context) { + var req emailAlerts.EmailAlertsSubmitReq + if err := ctx.ShouldBindJSON(&req); err != nil { + service.Error(ctx, err) + return + } + resp, err := service.EmailAlertsProvider.EmailAlertsSubmit(ctx, &req) + if err != nil { + service.Error(ctx, err) + return + } + service.Success(ctx, resp) +} + +func GetEmailInformationList(ctx *gin.Context) { + var req emailAlerts.GetEmailInformationListReq + if err := ctx.ShouldBindJSON(&req); err != nil { + service.Error(ctx, err) + return + } + resp, err := service.EmailAlertsProvider.GetEmailInformationList(ctx, &req) + if err != nil { + service.Error(ctx, err) + return + } + service.Success(ctx, resp) +} diff --git a/pkg/service/init.go b/pkg/service/init.go index 7d46cf4..90b679a 100644 --- a/pkg/service/init.go +++ b/pkg/service/init.go @@ -6,6 +6,7 @@ import ( "fonchain-fiee/api/accountFiee" "fonchain-fiee/api/bundle" "fonchain-fiee/api/cast" + "fonchain-fiee/api/emailAlerts" "fonchain-fiee/api/files" "fonchain-fiee/api/governance" "fonchain-fiee/api/order" @@ -33,6 +34,7 @@ var GovernanceProvider = new(governance.GovernanceClientImpl) var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl) var SecFilingProvider = new(secFilings.SecFilingsClientImpl) var ReportsProvider = new(reports.ReportsClientImpl) +var EmailAlertsProvider = new(emailAlerts.EmailAlertsClientImpl) func init() { config.SetConsumerService(BundleProvider) @@ -46,6 +48,7 @@ func init() { config.SetConsumerService(PressReleasesProvider) config.SetConsumerService(SecFilingProvider) config.SetConsumerService(ReportsProvider) + config.SetConsumerService(EmailAlertsProvider) if err := config.Load(); err != nil { panic(err)