From 0b44dcc8a8598593ae252371fbc1cadffcbde4b4 Mon Sep 17 00:00:00 2001 From: itzaname Date: Sat, 10 Sep 2022 15:54:05 -0400 Subject: [PATCH] Add datastore.proto --- datastore.proto | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 datastore.proto diff --git a/datastore.proto b/datastore.proto new file mode 100644 index 0000000..ffcf832 --- /dev/null +++ b/datastore.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +option go_package = "git.itzana.me/strafesnet/go-grpc/datastore"; + +package datastore; + +import "google/protobuf/struct.proto"; + +service DatastoreService { + rpc Get(KeyMessage) returns (ObjectResponse); + rpc Update(UpdateMessage) returns (ObjectResponse); + rpc Delete(KeyMessage) returns (NullResponse); +} + +message KeyMessage { + string Key = 1; +} + +message UpdateMessage { + string Key = 1; + google.protobuf.Struct Updates = 2; + google.protobuf.Struct Deletes = 3; +} + +message ObjectResponse { + string Key = 1; + google.protobuf.Struct Data = 2; +} + +message NullResponse { + +} \ No newline at end of file