KvdbApi
'KvdbApi' is a class representing Endpoint's API for Kvdbs and their messages.
Static Methods
create
Creates an instance of 'KvdbApi'.
Params
connetion
core::Connection &
Returns
KvdbApi
·
KvdbApi object
Methods
createKvdb
Creates a new KVDB in given Context.
Params
contextId
const std::string &
ID of the Context to create the KVDB in
users
const std::vector<core::UserWithPubKey> &
array of UserWithPubKey structs which indicates who will have access to the created KVDB
managers
const std::vector<core::UserWithPubKey> &
array of UserWithPubKey structs which indicates who will have access (and management rights) to the created KVDB
publicMeta
const core::Buffer &
public (unencrypted) metadata
privateMeta
const core::Buffer &
private (encrypted) metadata
policies
const std::optional<core::ContainerPolicy> &
KVDB's policies
Returns
std::string
·
ID of the created KVDB
updateKvdb
Updates an existing KVDB.
Params
kvdbId
const std::string &
ID of the KVDB to update
users
const std::vector<core::UserWithPubKey> &
array of UserWithPubKey structs which indicates who will have access to the created KVDB
managers
const std::vector<core::UserWithPubKey> &
array of UserWithPubKey structs which indicates who will have access (and management rights) to the created KVDB
publicMeta
const core::Buffer &
public (unencrypted) metadata
privateMeta
const core::Buffer &
private (encrypted) metadata
version
const int64_t
current version of the updated KVDB
force
const bool
force update (without checking version)
forceGenerateNewKey
const bool
force to regenerate a key for the KVDB
policies
const std::optional<core::ContainerPolicy> &
KVDB's policies
deleteKvdb
Deletes a KVDB by given KVDB ID.
Params
kvdbId
const std::string &
ID of the KVDB to delete
getKvdb
Gets a KVDB by given KVDB ID.
Params
kvdbId
const std::string &
ID of KVDB to get
Returns
Kvdb
·
struct containing info about the KVDB
listKvdbs
Gets a list of Kvdbs in given Context.
Params
contextId
const std::string &
ID of the Context to get the Kvdbs from
pagingQuery
const core::PagingQuery &
with list query parameters
Returns
core::PagingList<Kvdb>
·
struct containing a list of Kvdbs
getEntry
Gets a KVDB entry by given KVDB entry key and KVDB ID.
Params
kvdbId
const std::string &
KVDB ID of the KVDB entry to get
key
const std::string &
key of the KVDB entry to get
Returns
KvdbEntry
·
struct containing the KVDB entry
hasEntry
Check whether the KVDB entry exists.
Params
kvdbId
const std::string &
KVDB ID of the KVDB entry to check
key
const std::string &
key of the KVDB entry to check
Returns
bool
·
'true' if the KVDB has an entry with given key, 'false' otherwise
listEntriesKeys
Gets a list of KVDB entries keys from a KVDB.
Params
kvdbId
const std::string &
ID of the KVDB to list KVDB entries from
pagingQuery
const core::PagingQuery &
with list query parameters
Returns
core::PagingList<std::string>
·
struct containing a list of KVDB entries
listEntries
Gets a list of KVDB entries from a KVDB.
Params
kvdbId
const std::string &
ID of the KVDB to list KVDB entries from
pagingQuery
const core::PagingQuery &
with list query parameters
Returns
core::PagingList<KvdbEntry>
·
struct containing a list of KVDB entries
setEntry
Sets a KVDB entry in the given KVDB.
Params
kvdbId
const std::string &
ID of the KVDB to set the entry to
key
const std::string &
KVDB entry key
publicMeta
const core::Buffer &
public KVDB entry metadata
privateMeta
const core::Buffer &
private KVDB entry metadata
data
const core::Buffer &
content of the KVDB entry
version
int64_t
deleteEntry
Deletes a KVDB entry by given KVDB entry ID.
Params
kvdbId
const std::string &
KVDB ID of the KVDB entry to delete
key
const std::string &
key of the KVDB entry to delete
deleteEntries
Deletes KVDB entries by given KVDB IDs and the list of entry keys.
Params
kvdbId
const std::string &
ID of the KVDB database to delete from
keys
const std::vector<std::string> &
vector of the keys of the KVDB entries to delete
Returns
std::map<std::string,bool>
·
map with the statuses of deletion for every key
subscribeForKvdbEvents
Subscribes for the KVDB module main events.
unsubscribeFromKvdbEvents
Unsubscribes from the KVDB module main events.
subscribeForEntryEvents
Subscribes for events in given KVDB.
Params
kvdbId
std::string
unsubscribeFromEntryEvents
Unsubscribes from events in given KVDB.
Params
kvdbId
std::string
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.