ExampleService.proto
3.82 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.tianting.infoloop.grpc.exampleservice";
option java_outer_classname = "ExampleServiceProto";
option objc_class_prefix = "OP";
package com.tianting.infoloop.grpc.exampleservice;
service ExampleServiceRpc {
rpc GetTestExampleDbById (GetTestExampleDbByIdRpcRequest) returns (GetTestExampleDbByIdRpcResponse) {}
rpc GetTestExampleDbByIds (GetTestExampleDbByIdsRpcRequest) returns (GetTestExampleDbByIdsRpcResponse) {}
rpc GetAllTestExampleDb (GetAllTestExampleDbRpcRequest) returns (GetAllTestExampleDbRpcResponse) {}
rpc QueryTestExampleDbByCondition (QueryTestExampleDbByConditionRpcRequest) returns (QueryTestExampleDbByConditionRpcResponse) {}
rpc QueryTestExampleDbByPagination (QueryTestExampleDbByPaginationRpcRequest) returns (QueryTestExampleDbByPaginationRpcResponse) {}
rpc CreateTestExampleDb (CreateTestExampleDbRpcRequest) returns (CreateTestExampleDbRpcResponse) {}
rpc BatchCreateTestExampleDb (BatchCreateTestExampleDbRpcRequest) returns (BatchCreateTestExampleDbRpcResponse) {}
rpc UpdateTestExampleDb (UpdateTestExampleDbRpcRequest) returns (UpdateTestExampleDbRpcResponse) {}
rpc BatchUpdateTestExampleDb (BatchUpdateTestExampleDbRpcRequest) returns (BatchUpdateTestExampleDbRpcResponse) {}
rpc DeleteTestExampleDbByIds (DeleteTestExampleDbByIdsRpcRequest) returns (DeleteTestExampleDbRpcResponse) {}
}
enum TestExampleDbStatusEnum {
STATUS_UNKNOWN = 0;
STATUS_ENABLED = 1;
STATUS_DISABLED = 2;
}
message SingleTestExampleDbRpcResponse {
int32 id = 1;
int32 enterpriseId = 2;
string name = 3;
TestExampleDbStatusEnum status = 4;
int32 createdBy = 5;
int64 createdAt = 6;
int32 creationSource = 7;
int32 updatedBy = 8;
int64 updatedAt = 9;
int32 updateSource = 10;
bool isDeleted = 11;
}
message GetTestExampleDbByIdRpcRequest {
int32 id = 1;
}
message GetTestExampleDbByIdRpcResponse {
SingleTestExampleDbRpcResponse response = 1;
}
message GetTestExampleDbByIdsRpcRequest {
repeated int32 ids = 1;
}
message GetTestExampleDbByIdsRpcResponse {
repeated SingleTestExampleDbRpcResponse responses = 1;
}
message GetAllTestExampleDbRpcRequest {
}
message GetAllTestExampleDbRpcResponse {
repeated SingleTestExampleDbRpcResponse responses = 1;
}
message QueryTestExampleDbByConditionRpcRequest {
optional string name = 1;
optional TestExampleDbStatusEnum status = 2;
}
message QueryTestExampleDbByConditionRpcResponse {
repeated SingleTestExampleDbRpcResponse responses = 1;
}
message QueryTestExampleDbByPaginationRpcRequest {
optional string name = 1;
optional TestExampleDbStatusEnum status = 2;
int32 pageNo = 3;
int32 pageSize = 4;
}
message QueryTestExampleDbByPaginationRpcResponse {
int64 total = 1;
int64 pages = 2;
repeated SingleTestExampleDbRpcResponse responses = 3;
}
message TestExampleDbCreation{
string name = 1;
TestExampleDbStatusEnum status = 2;
}
message CreateTestExampleDbRpcRequest {
TestExampleDbCreation creation = 1;
}
message CreateTestExampleDbRpcResponse {
int32 id = 1;
bool isCreated = 2;
}
message BatchCreateTestExampleDbRpcRequest {
repeated TestExampleDbCreation creations = 1;
}
message BatchCreateTestExampleDbRpcResponse {
repeated int32 ids = 1;
bool isCreated = 2;
}
message TestExampleDbModification {
int32 id = 1;
optional string name = 2;
optional TestExampleDbStatusEnum status = 3;
}
message UpdateTestExampleDbRpcRequest {
TestExampleDbModification modification = 1;
}
message UpdateTestExampleDbRpcResponse {
bool isUpdated = 1;
}
message BatchUpdateTestExampleDbRpcRequest {
repeated TestExampleDbModification modifications = 1;
}
message BatchUpdateTestExampleDbRpcResponse {
bool isUpdated = 1;
}
message DeleteTestExampleDbByIdsRpcRequest {
repeated int32 ids = 1;
}
message DeleteTestExampleDbRpcResponse {
bool isDeleted = 1;
}