mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
45 lines
685 B
Protocol Buffer
45 lines
685 B
Protocol Buffer
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;
|
|
}
|