支持 stream 序列化 删除gateway的一些垃圾代码

This commit is contained in:
huangsimin@fusen.cn
2023-12-07 15:34:40 +08:00
parent a2873f273b
commit 2ed4499221
6 changed files with 94 additions and 66 deletions

View File

@@ -13,32 +13,24 @@ import "google/api/httpbody.proto";
//定义服务
service notify {
// 邮件注册确认
rpc EmailSend(basic.Request) returns (EmailSendRes) {
option (google.api.http) = {
post: "/api/notify/email/send"
body: "*"
};
}
rpc EmailSend(basic.Request) returns (EmailSendRes) {}
// 邮件注册确认
rpc EmailRegisterConfirm(basic.Request) returns (basic.Response) {
option (google.api.http) = {
post: "/api/notify/email/register/confirm"
body: "*"
};
}
rpc EmailRegisterConfirm(stream EmailStreamReq) returns (stream EmailStreamResp) {}
}
message EmailSendReq {
string name = 1;
}
message EmailStreamReq {
string file_name = 1;
google.api.HttpBody file_content = 2;
string file_content = 2;
}
message EmailStreamResp {
string code = 1;
string ok = 2;
}