-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtodo.proto
57 lines (44 loc) · 952 Bytes
/
todo.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
syntax = "proto3";
import "google/protobuf/timestamp.proto";
service ToDo {
rpc CreateToDo (CreateToDoReq) returns (CreateToDoRsp) {}
rpc GetToDo (GetToDoReq) returns (GetToDoRsp) {}
rpc DeleteToDo (DeleteToDoReq) returns (DeleteToDoRsp) {}
rpc UpdateToDo (UpdateToDoReq) returns (UpdateToDoRsp) {}
rpc ListToDo (ListToDoReq) returns (ListToDoRsp) {}
}
message ToDoEntry {
int32 id = 1;
string title = 2;
string text = 3;
google.protobuf.Timestamp created_at = 4;
google.protobuf.Timestamp updated_at = 5;
}
message CreateToDoReq {
ToDoEntry item = 2;
}
message CreateToDoRsp {
int32 id = 1;
}
message GetToDoReq {
int32 id = 1;
}
message GetToDoRsp {
ToDoEntry item = 1;
}
message DeleteToDoReq {
int32 id = 1;
}
message DeleteToDoRsp {
}
message UpdateToDoReq {
ToDoEntry item = 1;
}
message UpdateToDoRsp {
}
message ListToDoReq {
uint32 limit = 1;
}
message ListToDoRsp {
repeated ToDoEntry items = 1;
}