Files
komp_ac/common/proto/tables_data.proto
filipriec 9eb46cb5d3 kompAC
2025-07-25 11:59:18 +02:00

72 lines
1.6 KiB
Protocol Buffer

// common/proto/tables_data.proto
syntax = "proto3";
package KompAC.tables_data;
import "common.proto";
import "google/protobuf/struct.proto";
service TablesData {
rpc PostTableData (PostTableDataRequest) returns (PostTableDataResponse);
rpc PutTableData (PutTableDataRequest) returns (PutTableDataResponse);
rpc DeleteTableData (DeleteTableDataRequest) returns (DeleteTableDataResponse);
rpc GetTableData(GetTableDataRequest) returns (GetTableDataResponse);
rpc GetTableDataCount(GetTableDataCountRequest) returns (KompAC.common.CountResponse);
rpc GetTableDataByPosition(GetTableDataByPositionRequest) returns (GetTableDataResponse);
}
message PostTableDataRequest {
string profile_name = 1;
string table_name = 2;
map<string, google.protobuf.Value> data = 3;
}
message PostTableDataResponse {
bool success = 1;
string message = 2;
int64 inserted_id = 3;
}
message PutTableDataRequest {
string profile_name = 1;
string table_name = 2;
int64 id = 3;
map<string, google.protobuf.Value> data = 4;
}
message PutTableDataResponse {
bool success = 1;
string message = 2;
int64 updated_id = 3;
}
message DeleteTableDataRequest {
string profile_name = 1;
string table_name = 2;
int64 record_id = 3;
}
message DeleteTableDataResponse {
bool success = 1;
}
message GetTableDataRequest {
string profile_name = 1;
string table_name = 2;
int64 id = 3;
}
message GetTableDataResponse {
map<string, string> data = 1;
}
message GetTableDataCountRequest {
string profile_name = 1;
string table_name = 2;
}
message GetTableDataByPositionRequest {
string profile_name = 1;
string table_name = 2;
int32 position = 3;
}