redesigned proto files
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
// proto/api.proto
|
||||
// proto/adresar.proto
|
||||
syntax = "proto3";
|
||||
|
||||
package multieko2;
|
||||
package multieko2.adresar;
|
||||
|
||||
service Adresar {
|
||||
rpc PostAdresar (PostAdresarRequest) returns (AdresarResponse);
|
||||
rpc GetAdresar (GetAdresarRequest) returns (AdresarResponse);
|
||||
rpc PutAdresar (PutAdresarRequest) returns (AdresarResponse);
|
||||
rpc DeleteAdresar (DeleteAdresarRequest) returns (DeleteAdresarResponse);
|
||||
rpc GetAdresarCount (Empty) returns (CountResponse); // New endpoint
|
||||
rpc GetAdresarByPosition (PositionRequest) returns (AdresarResponse); // New endpoint
|
||||
rpc GetTableStructure (Empty) returns (TableStructureResponse); // New endpoint for table structure
|
||||
rpc GetAdresarCount (Empty) returns (CountResponse);
|
||||
rpc GetAdresarByPosition (PositionRequest) returns (AdresarResponse);
|
||||
rpc GetTableStructure (Empty) returns (TableStructureResponse);
|
||||
}
|
||||
|
||||
// Existing messages
|
||||
message GetAdresarRequest {
|
||||
int64 id = 1; // The ID of the Adresar entry to retrieve
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
message DeleteAdresarRequest {
|
||||
int64 id = 1; // The ID of the Adresar entry to delete
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
message PostAdresarRequest {
|
||||
@@ -79,28 +78,26 @@ message PutAdresarRequest {
|
||||
}
|
||||
|
||||
message DeleteAdresarResponse {
|
||||
bool success = 1; // Indicates whether the deletion was successful
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
// New messages for the additional endpoints
|
||||
message Empty {} // Empty request for count
|
||||
message Empty {}
|
||||
|
||||
message CountResponse {
|
||||
int64 count = 1; // Response with the count of items
|
||||
int64 count = 1;
|
||||
}
|
||||
|
||||
message PositionRequest {
|
||||
int64 position = 1; // Request with the position of the item to retrieve
|
||||
int64 position = 1;
|
||||
}
|
||||
|
||||
// New messages for the table structure endpoint
|
||||
message TableStructureResponse {
|
||||
repeated TableColumn columns = 1; // List of columns in the table
|
||||
repeated TableColumn columns = 1;
|
||||
}
|
||||
|
||||
message TableColumn {
|
||||
string name = 1; // Name of the column
|
||||
string data_type = 2; // Data type of the column (e.g., TEXT, INT, etc.)
|
||||
bool is_nullable = 3; // Whether the column allows NULL values
|
||||
bool is_primary_key = 4; // Whether the column is a primary key
|
||||
string name = 1;
|
||||
string data_type = 2;
|
||||
bool is_nullable = 3;
|
||||
bool is_primary_key = 4;
|
||||
}
|
||||
@@ -3,6 +3,8 @@ syntax = "proto3";
|
||||
|
||||
package multieko2.uctovnictvo;
|
||||
|
||||
import "adresar.proto";
|
||||
|
||||
service Uctovnictvo {
|
||||
rpc PostUctovnictvo (PostUctovnictvoRequest) returns (UctovnictvoResponse);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user