-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.proto
74 lines (58 loc) · 1.15 KB
/
demo.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
syntax = "proto3";
package demo;
import "github.com/metaverse/truss/deftree/googlethirdparty/annotations.proto";
// import "common.proto";
service Demo {
// 服务健康检测接口,服务注册用
rpc Alive (AliveRequest) returns (Empty) {
option (google.api.http) = {
get: "/alive"
};
}
rpc Foo (FooRequest) returns (FooResponse) {
option (google.api.http) = {
post: "/foo"
body: "*"
};
}
rpc Test (TestRequest) returns (TestResponse) {
option (google.api.http) = {
post: "/test"
body: "*"
};
}
rpc Registe (RegisteRequest) returns (RegisteResponse) {
option (google.api.http) = {
post: "/customer/registe"
body: "*"
};
}
}
message RegisteRequest {
string Phone = 1;
fixed32 Source = 2;// 1 手机号
}
message RegisteResponse {
string Code = 1;
string Message = 2;
RegisteData Data = 3;
}
message RegisteData {
string Code = 1;
}
message FooRequest {
string foo = 1;
}
message FooResponse {
string code = 1;
string message = 2;
}
message AliveRequest {
}
message AliveResponse {
}
message TestRequest {
}
message TestResponse {
}
message Empty {}