github.com/tendermint/tmlibs@v0.9.0/db/remotedb/proto/defs.proto (about) 1 syntax = "proto3"; 2 3 package protodb; 4 5 message Batch { 6 repeated Operation ops = 1; 7 } 8 9 message Operation { 10 Entity entity = 1; 11 enum Type { 12 SET = 0; 13 DELETE = 1; 14 } 15 Type type = 2; 16 } 17 18 message Entity { 19 int32 id = 1; 20 bytes key = 2; 21 bytes value = 3; 22 bool exists = 4; 23 bytes start = 5; 24 bytes end = 6; 25 string err = 7; 26 int64 created_at = 8; 27 } 28 29 message Nothing { 30 } 31 32 message Domain { 33 bytes start = 1; 34 bytes end = 2; 35 } 36 37 message Iterator { 38 Domain domain = 1; 39 bool valid = 2; 40 bytes key = 3; 41 bytes value = 4; 42 } 43 44 message Stats { 45 map<string, string> data = 1; 46 int64 time_at = 2; 47 } 48 49 message Init { 50 string Type = 1; 51 string Name = 2; 52 string Dir = 3; 53 } 54 55 service DB { 56 rpc init(Init) returns (Entity) {} 57 rpc get(Entity) returns (Entity) {} 58 rpc getStream(stream Entity) returns (stream Entity) {} 59 60 rpc has(Entity) returns (Entity) {} 61 rpc set(Entity) returns (Nothing) {} 62 rpc setSync(Entity) returns (Nothing) {} 63 rpc delete(Entity) returns (Nothing) {} 64 rpc deleteSync(Entity) returns (Nothing) {} 65 rpc iterator(Entity) returns (stream Iterator) {} 66 rpc reverseIterator(Entity) returns (stream Iterator) {} 67 // rpc print(Nothing) returns (Entity) {} 68 rpc stats(Nothing) returns (Stats) {} 69 rpc batchWrite(Batch) returns (Nothing) {} 70 rpc batchWriteSync(Batch) returns (Nothing) {} 71 }