move messages to mail (#56)

This commit is contained in:
Asim Aslam
2021-02-01 11:20:52 +00:00
committed by GitHub
parent 39c77b9aeb
commit 226a595590
10 changed files with 137 additions and 114 deletions

44
mail/proto/mail.proto Normal file
View File

@@ -0,0 +1,44 @@
syntax = "proto3";
package mail;
option go_package = "proto;mail";
service Mail {
rpc Send(SendRequest) returns (SendResponse);
rpc List(ListRequest) returns (ListResponse);
rpc Read(ReadRequest) returns (ReadResponse);
}
message Message {
string id = 1;
string to = 2;
string from = 3;
string subject = 4;
string text = 5;
int64 sent_at = 6;
}
message SendRequest {
string to = 1;
string from = 2;
string subject = 3;
string text = 4;
}
message SendResponse {}
message ListRequest {
string user = 1;
}
message ListResponse {
repeated Message mail = 1;
}
message ReadRequest {
string id = 1;
}
message ReadResponse {
Message message = 1;
}