KvdbApi

expect class KvdbApi(connection: Connection) : AutoCloseable

Manages PrivMX Bridge KVDBs and their entries.

actual class KvdbApi(connection: Connection) : AutoCloseable

Manages PrivMX Bridge KVDBs and their messages.

actual class KvdbApi(connection: Connection) : AutoCloseable

Constructors

Link copied to clipboard
expect constructor(connection: Connection)
actual constructor(connection: Connection)
actual constructor(connection: Connection)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
expect open override fun close()

Frees memory.

actual open override fun close()

Frees memory.

actual open override fun close()

Frees memory.

Link copied to clipboard
expect fun createKvdb(contextId: String, users: List<UserWithPubKey>, managers: List<UserWithPubKey>, publicMeta: ByteArray, privateMeta: ByteArray, policies: ContainerPolicy? = null): String

Creates a new KVDB in given Context.

actual fun createKvdb(contextId: String, users: List<UserWithPubKey>, managers: List<UserWithPubKey>, publicMeta: ByteArray, privateMeta: ByteArray, policies: ContainerPolicy?): String

Creates a new KVDB in given Context.

actual external fun createKvdb(contextId: String, users: List<UserWithPubKey>, managers: List<UserWithPubKey>, publicMeta: ByteArray, privateMeta: ByteArray, policies: ContainerPolicy?): String

Creates a new KVDB in given Context.

Link copied to clipboard
expect fun deleteEntries(kvdbId: String, keys: Set<String>): Map<String, Boolean>

Deletes KVDB entries by given KVDB IDs and the set of entry keys.

actual fun deleteEntries(kvdbId: String, keys: Set<String>): Map<String, Boolean>

Deletes KVDB entries by given KVDB IDs and the set of entry keys.

actual external fun deleteEntries(kvdbId: String, keys: Set<String>): Map<String, Boolean>

Deletes KVDB entries by given KVDB IDs and the set of entry keys.

Link copied to clipboard
expect fun deleteEntry(kvdbId: String, key: String)

Deletes a KVDB entry by given KVDB entry ID.

actual fun deleteEntry(kvdbId: String, key: String)

Deletes a KVDB entry by given KVDB entry ID.

actual external fun deleteEntry(kvdbId: String, key: String)

Deletes a KVDB entry by given KVDB entry ID.

Link copied to clipboard
expect fun deleteKvdb(kvdbId: String)

Deletes a KVDB by given KVDB ID.

actual fun deleteKvdb(kvdbId: String)

Deletes a KVDB by given KVDB ID.

actual external fun deleteKvdb(kvdbId: String)

Deletes a KVDB by given KVDB ID.

Link copied to clipboard
expect fun getEntry(kvdbId: String, key: String): KvdbEntry

Gets a KVDB entry by given KVDB entry key and KVDB ID.

actual fun getEntry(kvdbId: String, key: String): KvdbEntry

Gets a KVDB entry by given KVDB entry key and KVDB ID.

actual external fun getEntry(kvdbId: String, key: String): KvdbEntry

Gets a KVDB entry by given KVDB entry key and KVDB ID.

Link copied to clipboard
expect fun getKvdb(kvdbId: String): Kvdb

Gets a KVDB by given KVDB ID.

actual fun getKvdb(kvdbId: String): Kvdb

Gets a KVDB by given KVDB ID.

actual external fun getKvdb(kvdbId: String): Kvdb

Gets a KVDB by given KVDB ID.

Link copied to clipboard
expect fun hasEntry(kvdbId: String, key: String): Boolean

Check whether the KVDB entry exists.

actual fun hasEntry(kvdbId: String, key: String): Boolean

Check whether the KVDB entry exists.

actual external fun hasEntry(kvdbId: String, key: String): Boolean

Check whether the KVDB entry exists.

Link copied to clipboard
expect fun listEntries(kvdbId: String, skip: Long, limit: Long, sortOrder: String = "desc", lastId: String? = null, queryAsJson: String? = null, sortBy: String? = null): PagingList<KvdbEntry>

Gets a list of KVDB entries from a KVDB.

actual fun listEntries(kvdbId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<KvdbEntry>

Gets a list of KVDB entries from a KVDB.

actual external fun listEntries(kvdbId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<KvdbEntry>

Gets a list of KVDB entries from a KVDB.

Link copied to clipboard
expect fun listEntriesKeys(kvdbId: String, skip: Long, limit: Long, sortOrder: String = "desc", lastId: String? = null, queryAsJson: String? = null, sortBy: String? = null): PagingList<String>

Gets a list of KVDB entries keys from a KVDB.

actual fun listEntriesKeys(kvdbId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<String>

Gets a list of KVDB entries keys from a KVDB.

actual external fun listEntriesKeys(kvdbId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<String>

Gets a list of KVDB entries keys from a KVDB.

Link copied to clipboard
expect fun listKvdbs(contextId: String, skip: Long, limit: Long, sortOrder: String = "desc", lastId: String? = null, queryAsJson: String? = null, sortBy: String? = null): PagingList<Kvdb>

Gets a list of KVDBs in given Context.

actual fun listKvdbs(contextId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<Kvdb>

Gets a list of KVDBs in given Context.

actual external fun listKvdbs(contextId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<Kvdb>

Gets a list of KVDBs in given Context.

Link copied to clipboard
expect fun setEntry(kvdbId: String, key: String, publicMeta: ByteArray, privateMeta: ByteArray, data: ByteArray, version: Long = 0)

Sets a KVDB entry in the given KVDB.

actual fun setEntry(kvdbId: String, key: String, publicMeta: ByteArray, privateMeta: ByteArray, data: ByteArray, version: Long)

Sets a KVDB entry in the given KVDB.

actual external fun setEntry(kvdbId: String, key: String, publicMeta: ByteArray, privateMeta: ByteArray, data: ByteArray, version: Long)

Sets a KVDB entry in the given KVDB.

Link copied to clipboard
expect fun subscribeForEntryEvents(kvdbId: String)

Subscribes for events in given KVDB.

actual fun subscribeForEntryEvents(kvdbId: String)

Subscribes for events in given KVDB.

actual external fun subscribeForEntryEvents(kvdbId: String)

Subscribes for events in given KVDB.

Link copied to clipboard

Subscribes for the KVDB module main events.

Subscribes for the KVDB module main events.

actual external fun subscribeForKvdbEvents()

Subscribes for the KVDB module main events.

Link copied to clipboard

Unsubscribes from events in given KVDB.

Unsubscribes from events in given KVDB.

actual external fun unsubscribeFromEntryEvents(kvdbId: String)

Unsubscribes from events in given KVDB.

Link copied to clipboard

Unsubscribes from the KVDB module main events.

Unsubscribes from the KVDB module main events.

actual external fun unsubscribeFromKvdbEvents()

Unsubscribes from the KVDB module main events.

Link copied to clipboard
expect fun updateKvdb(kvdbId: String, users: List<UserWithPubKey>, managers: List<UserWithPubKey>, publicMeta: ByteArray, privateMeta: ByteArray, version: Long, force: Boolean, forceGenerateNewKey: Boolean = false, policies: ContainerPolicy? = null)

Updates an existing KVDB.

actual fun updateKvdb(kvdbId: String, users: List<UserWithPubKey>, managers: List<UserWithPubKey>, publicMeta: ByteArray, privateMeta: ByteArray, version: Long, force: Boolean, forceGenerateNewKey: Boolean, policies: ContainerPolicy?)

Updates an existing KVDB.

actual external fun updateKvdb(kvdbId: String, users: List<UserWithPubKey>, managers: List<UserWithPubKey>, publicMeta: ByteArray, privateMeta: ByteArray, version: Long, force: Boolean, forceGenerateNewKey: Boolean, policies: ContainerPolicy?)

Updates an existing KVDB.