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 fun buildSubscriptionQuery(eventType: KvdbEventType, selectorType: KvdbEventSelectorType, selectorId: String): String

Generate subscription Query for the KVDB events.

actual fun buildSubscriptionQuery(eventType: KvdbEventType, selectorType: KvdbEventSelectorType, selectorId: String): String

Generate subscription Query for the KVDB events.

actual fun buildSubscriptionQuery(eventType: KvdbEventType, selectorType: KvdbEventSelectorType, selectorId: String): String
Link copied to clipboard
expect fun buildSubscriptionQueryForSelectedEntry(eventType: KvdbEventType, kvdbId: String, kvdbEntryKey: String): String

Generate subscription Query for the KVDB events for single KvdbEntry.

actual fun buildSubscriptionQueryForSelectedEntry(eventType: KvdbEventType, kvdbId: String, kvdbEntryKey: String): String

Generate subscription Query for the KVDB events for single KvdbEntry.

actual fun buildSubscriptionQueryForSelectedEntry(eventType: KvdbEventType, kvdbId: String, kvdbEntryKey: String): String

Generate subscription Query for the KVDB events for single KvdbEntry.

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 subscribeFor(subscriptionQueries: List<String>): List<String>

Subscribe for the KVDB events on the given subscription query.

actual fun subscribeFor(subscriptionQueries: List<String>): List<String>

Subscribe for the KVDB events on the given subscription query.

actual external fun subscribeFor(subscriptionQueries: List<String>): List<String>

Subscribe for the KVDB events on the given subscription query.

Link copied to clipboard
expect fun unsubscribeFrom(subscriptionIds: List<String>)

Unsubscribe from events with the given subscriptionId.

actual fun unsubscribeFrom(subscriptionIds: List<String>)

Unsubscribe from events with the given subscriptionId.

actual external fun unsubscribeFrom(subscriptionIds: List<String>)

Unsubscribe from events with the given subscriptionId.

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.