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,9 +9,9 @@ package goutils
// google.golang.org/protobuf/cmd/protoc-gen-go \
// google.golang.org/grpc/cmd/protoc-gen-go-grpc
import (
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
)
// import (
// _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway"
// _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
// _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
// _ "google.golang.org/protobuf/cmd/protoc-gen-go"
// )

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 {