KVNamespace

external interface KVNamespace<Key : String>

Functions

Link copied to clipboard
abstract fun delete(key: Key): Promise<Unit>
Link copied to clipboard
abstract fun get(key: Key): dynamic
abstract fun <ExpectedValue> get(key: Key): Promise<ExpectedValue?>
abstract fun get(key: Key, options: KVNamespaceGetOptionsPartial<Nothing?> = definedExternally): Promise<String?>
abstract fun get(key: Key, options: KVNamespaceGetOptions<String> = definedExternally): dynamic
abstract fun <ExpectedValue> get(key: Key, options: KVNamespaceGetOptions<String> = definedExternally): Promise<ExpectedValue?>
abstract fun get(key: Key, type: String): dynamic
abstract fun <ExpectedValue> get(key: Key, type: String): Promise<ExpectedValue?>
Link copied to clipboard
abstract fun list(options: KVNamespaceListOptions = definedExternally): Promise<dynamic>
Link copied to clipboard
abstract fun put(key: Key, value: ReadableStream<Uint8Array>): Promise<Unit>
abstract fun put(key: Key, value: ArrayBuffer): Promise<Unit>
abstract fun put(key: Key, value: ArrayBufferView): Promise<Unit>
abstract fun put(key: Key, value: String): Promise<Unit>
abstract fun put(key: Key, value: ReadableStream<Uint8Array>, options: KVNamespacePutOptions = definedExternally): Promise<Unit>
abstract fun put(key: Key, value: ArrayBuffer, options: KVNamespacePutOptions = definedExternally): Promise<Unit>
abstract fun put(key: Key, value: ArrayBufferView, options: KVNamespacePutOptions = definedExternally): Promise<Unit>
abstract fun put(key: Key, value: String, options: KVNamespacePutOptions = definedExternally): Promise<Unit>