impl client and server for KeyValueRepo

This commit is contained in:
000Sanya
2020-08-29 12:33:13 +10:00
parent 00068a064f
commit cb6fedfb52
9 changed files with 324 additions and 0 deletions
utils/repos/ktor
client
src
commonMain
kotlin
common
src
commonMain
kotlin
com
insanusmokrassar
server
src
jvmMain
kotlin

@@ -0,0 +1,4 @@
package com.insanusmokrassar.postssystem.utils.repos.ktor.common.key_value
const val keyParameterName = "key"
const val reversedParameterName = "reversed"

@@ -0,0 +1,9 @@
package com.insanusmokrassar.postssystem.utils.repos.ktor.common.key_value
import kotlinx.serialization.Serializable
@Serializable
data class KeyValuePostObject<K, V> (
val key: K,
val value: V,
)

@@ -0,0 +1,12 @@
package com.insanusmokrassar.postssystem.utils.repos.ktor.common.key_value
const val getRoute = "get"
const val valuesRoute = "values"
const val keysRoute = "keys"
const val containsRoute = "contains"
const val countRoute = "count"
const val onNewValueRoute = "onNewValue"
const val onValueRemovedRoute = "onValueRemoved"
const val setRoute = "set"
const val unsetRoute = "unset"