mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 15:51:24 +00:00
move messages to mail (#56)
This commit is contained in:
44
mail/proto/mail.proto
Normal file
44
mail/proto/mail.proto
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user