add update node

This commit is contained in:
2025-12-07 03:41:45 +07:00
parent 2192bf4e77
commit 49c415d4b9
13 changed files with 538 additions and 236 deletions
+26 -11
View File
@@ -83,6 +83,13 @@ service EveningDetective {
get: "/graph"
};
}
rpc UpdateNode(UpdateNodeReq) returns (UpdateNodeRsp) {
option (google.api.http) = {
put: "/graph/nodes",
body: "*"
};
}
}
message PingReq {}
@@ -189,24 +196,32 @@ message DownloadTeamsQrCodesFileRsp {
message GetGraphReq {}
message GetGraphRsp {
repeated Node nodes = 1;
repeated GraphNode nodes = 1;
repeated Edge edges = 2;
int32 countNodes = 3;
int32 countEdges = 4;
message Node {
int32 id = 1;
string label = 2;
string name = 3;
string text = 4;
repeated Application applications = 5;
}
message Edge {
int32 from = 1;
int32 to = 2;
string arrows = 3;
}
message Application {
string name = 1;
}
}
message UpdateNodeReq {
GraphNode node = 1;
}
message UpdateNodeRsp {}
message GraphNode {
int32 id = 1;
string label = 2;
string name = 3;
string text = 4;
repeated GraphApplication applications = 5;
}
message GraphApplication {
string name = 1;
}