This commit is contained in:
huangsimin@fusen.cn
2023-12-15 18:34:20 +08:00
parent 580e32c223
commit decff6f2e6
2 changed files with 44 additions and 8 deletions

View File

@@ -9,18 +9,54 @@ import "service/basic.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/any.proto";
import "google/api/httpbody.proto";
import "google/protobuf/timestamp.proto";
//定义服务
service notify {
// 邮件注册确认
rpc EmailSend(basic.Request) returns (EmailSendRes) {}
rpc EmailSend(EmailSendReq) returns (EmailSendRes) {}
// 邮件注册确认
rpc EmailRegisterConfirm(stream EmailStreamReq) returns (stream EmailStreamResp) {}
}
message Operator {
// 操作类型
enum Type {
IMMEDIATE_RESEND = 0; // 马上重发
NORMAL_SEND = 1; // 普通发送
SCHEDULED_SEND = 2; // 计划发送
CANCEL_SEND = 3; // 取消发送
}
message Retry {
int64 retry_count = 1; // 允许重发次数
google.protobuf.Timestamp interval_time = 2; // 执行的时间间隔
}
Type type = 1; // 操作类型
optional Retry retry = 2; //重试
optional google.protobuf.Timestamp start_time = 3; // 在这个时间开始执行
}
// 默认是 type email
message EmailSendReq {
string name = 1;
string notify_id = 1; // 用于处理唯一的任务,重发都会被利用到 256字节
string sender = 2; // 发送者
string title = 3; // 邮件标题
string content = 4; // 邮件内容
string target_email = 5; // 发送的目标email
Operator operator = 6; // 操作类型
// string company_name = 5; // fs公司名
// string confirmation_link = 6; // fs确认连接
// string sender_name = 7; // 发送人
optional google.protobuf.Struct metadata = 7; // 扩展参数
}
message EmailStreamReq {