summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-04-17 19:20:53 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-04-17 19:20:53 +0200
commit8dfd21ed430e9407880a5fc640b3351ccf34db5c (patch)
tree993ffecf69680768496ed405af1f4e3665d5eba9 /proto
parent056a0728c775e37460ed00791ad503e03a88f3d6 (diff)
Refactor into server-client architecture using protobuf
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'proto')
-rw-r--r--proto/fss.proto36
1 files changed, 36 insertions, 0 deletions
diff --git a/proto/fss.proto b/proto/fss.proto
new file mode 100644
index 0000000..12fda7a
--- /dev/null
+++ b/proto/fss.proto
@@ -0,0 +1,36 @@
+syntax = "proto3";
+package fss;
+
+service FSS {
+ rpc GetVersion (VersionRequest) returns (VersionReply);
+
+ rpc IndexFile (IndexFileRequest) returns (IndexFileReply);
+ rpc SearchQuery (SearchQueryRequest) returns (SearchResponse);
+}
+
+
+message VersionRequest {
+}
+
+message VersionReply {
+ string version = 1; // Reply contains only the version string
+}
+
+
+message IndexFileRequest {
+ string path = 1;
+}
+
+message IndexFileReply {
+ bool error = 1;
+}
+
+
+message SearchQueryRequest {
+ string query = 1;
+}
+
+message SearchResponse {
+ bool success = 1;
+ repeated string pathes = 2;
+}