-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog.proto
More file actions
42 lines (33 loc) · 851 Bytes
/
catalog.proto
File metadata and controls
42 lines (33 loc) · 851 Bytes
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
syntax = "proto3";
package catalog;
service CatalogService {
rpc GetProduct(ProductRequest) returns (ProductResponse);
rpc GetProducts(EmptyRequest) returns (ProductsResponse);
rpc CreateProduct(ProductCreationRequest) returns (ProductResponse);
rpc DeleteProduct(DeleteProductRequest) returns (EmptyRequest);
rpc UpdateProduct(UpdateProductRequest) returns (ProductResponse);
}
message ProductRequest {
string id = 1;
}
message ProductResponse {
string id = 1;
string name = 2;
string description = 3;
}
message ProductsResponse {
repeated ProductResponse products = 1;
}
message ProductCreationRequest {
string name = 1;
string description = 2;
}
message DeleteProductRequest {
string id = 1;
}
message UpdateProductRequest {
string id = 1;
string name = 2;
string description = 3;
}
message EmptyRequest {}