codenotary / immudb

immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history
https://immudb.io
Other
8.54k stars 341 forks source link

Golang SDK immudb #34

Closed mmeloni closed 4 years ago

mmeloni commented 4 years ago

Actually immugw rest proxy exposes simplify api that wrap immudb one's. All safe methods exposes by immugw (SafeSet, SafeGet, SafeReference, SafeZAdd) doesn't require for root and index because this data is managed internally. The purpose of this task is to create a golang SDK to offer the same capabilities but in pure GO. It should be fine that immugw wil be upgraded in order to use the newly sdk. In order to do this you could use a new .proto schema that extends https://github.com/codenotary/immudb/blob/master/pkg/api/schema/schema.proto Ex: actual SafeGet service in immudb schema.proto

message SafeGetOptions {
    Key key = 1;
    Index rootIndex = 2;
}
rpc SafeGet(SafeGetOptions) returns (SafeItem){
        option (google.api.http) = {
            post: "/v1/immurestproxy/item/safe/get"
            body: "*"
        };
    };

New SafeSet in immu.proto

rpc SafeGet(Key) returns (VeridiedItem){};

eg: VerifiedItem contains item and a bool in which we put verification results.

Flow:

padurean commented 4 years ago

Merged to master.