-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.proto
55 lines (52 loc) · 1.12 KB
/
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
syntax = "proto3";
option go_package = "api/";
package userproto;
service CustomerService{
rpc CreateUser(Customer)returns (resCustomer);
rpc GetUser(CustomerId)returns(resCustomer);
rpc DeleteUSer(CustomerId) returns(resDeletedUser);
}
message resCustomer {
string name=1;
string email=3;
repeated string todo=4;
}
message resDeletedUser{
string email=1;
string id=2;
string message=3;
}
message CustomerId{
string Id =1;
}
message Customer{
string name=1;
string email=2;
string password=3;
}
message getUser{
string id=1;
}
service TodoService{
rpc CreateTodo(Todo) returns(resTodo);
rpc AddNewToto(Todo) returns(resTodo);
rpc GetTodo(CustomerId) returns(resTodo);
rpc DeleteTodo(removeTodo) returns(resDeleteTodo);
rpc DeleteAllTodo(CustomerId) returns(resDeleteTodo);
}
message resDeleteTodo{
string Title=1;
string message=2;
}
message Todo{
repeated string Title=1;
string CustomerId=2;
}
message resTodo {
repeated string Title=1;
string CustomerId=2;
}
message removeTodo{
repeated string Title=1;
string CustomerId=2;
}