-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlc.proto
98 lines (80 loc) · 2.78 KB
/
lc.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
syntax = "proto3";
import "schema.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
package lc.schema;
option go_package = "github.com/vchain-us/ledger-compliance/server/schema";
message TamperReport {
uint64 index = 1;
bytes key = 2;
bytes root = 3;
}
message ReportOptions{
TamperReport payload = 1;
immudb.schema.Signature signature = 2;
}
message DataValue {
string name = 1;
string type = 2;
bytes value = 3;
}
message Data {
string key = 1;
int64 msgID = 2;
string dbName = 3;
string tableName = 4;
string operation = 5;
bytes data = 6;
}
message Response {
int32 status = 1;
string msg = 2;
int64 msgID = 3;
immudb.schema.VerifiableTx VerifiableTx = 4;
immudb.schema.ImmutableState state = 5;
}
message VerifiableItemExt {
immudb.schema.VerifiableEntry item = 1;
google.protobuf.Timestamp timestamp = 2;
}
message ItemExt {
immudb.schema.Entry item = 1;
google.protobuf.Timestamp timestamp = 2;
}
message ItemExtList {
repeated ItemExt items = 1;
}
message ZItemExt {
immudb.schema.ZEntry item = 1;
google.protobuf.Timestamp timestamp = 2;
}
message ZItemExtList {
repeated ZItemExt items = 1;
}
service LcService {
// immudb primitives
// setters and getters
rpc Set (immudb.schema.SetRequest) returns (immudb.schema.TxMetadata){};
rpc Get (immudb.schema.KeyRequest) returns (immudb.schema.Entry){};
rpc VerifiableSet (immudb.schema.VerifiableSetRequest) returns (immudb.schema.VerifiableTx){};
rpc VerifiableGet (immudb.schema.VerifiableGetRequest) returns (immudb.schema.VerifiableEntry){};
// batch
rpc GetAll (immudb.schema.KeyListRequest) returns (immudb.schema.Entries){};
rpc ExecAll (immudb.schema.ExecAllRequest) returns (immudb.schema.TxMetadata) {};
// scanners
rpc Scan(immudb.schema.ScanRequest) returns (immudb.schema.Entries){};
rpc History(immudb.schema.HistoryRequest) returns (immudb.schema.Entries){};
rpc ZAdd (immudb.schema.ZAddRequest) returns (immudb.schema.TxMetadata){};
rpc VerifiableZAdd (immudb.schema.VerifiableZAddRequest) returns (immudb.schema.VerifiableTx){};
rpc ZScan (immudb.schema.ZScanRequest) returns (immudb.schema.ZEntries){};
// mixed
rpc CurrentState (google.protobuf.Empty) returns (immudb.schema.ImmutableState){};
rpc Health (google.protobuf.Empty) returns (immudb.schema.HealthResponse){};
// ledger compliance extensions
rpc ReportTamper(ReportOptions) returns (google.protobuf.Empty){};
rpc SendData (stream Data) returns (stream Response){};
// ledger compliance extensions - items extended with additional properties managed by LC backend (date)
rpc VerifiableGetExt(immudb.schema.VerifiableGetRequest) returns (VerifiableItemExt){};
rpc ZScanExt (immudb.schema.ZScanRequest) returns (ZItemExtList){};
rpc HistoryExt(immudb.schema.HistoryRequest) returns (ItemExtList){};
}