aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-jooby/src/commonMain/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-server-jooby/src/commonMain/kotlin')
-rw-r--r--kvision-modules/kvision-server-jooby/src/commonMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/kvision-modules/kvision-server-jooby/src/commonMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-jooby/src/commonMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index 19da13c0..3ba4998d 100644
--- a/kvision-modules/kvision-server-jooby/src/commonMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-jooby/src/commonMain/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -104,6 +104,18 @@ expect open class KVServiceManager<T : Any>(serviceClass: KClass<T>) {
)
/**
+ * Binds a given route with a function of the receiver.
+ * @param function a function of the receiver
+ * @param method a HTTP method
+ * @param route a route
+ */
+ protected inline fun <reified PAR1, reified PAR2, reified PAR3, reified PAR4, reified PAR5, reified PAR6, reified RET> bind(
+ noinline function: suspend T.(PAR1, PAR2, PAR3, PAR4, PAR5, PAR6) -> RET,
+ method: HttpMethod = HttpMethod.POST,
+ route: String? = null
+ )
+
+ /**
* Binds a given function of the receiver as a tabulator component source
* @param function a function of the receiver
*/