From 80f33eae37fff276f538ce43d2b0e18f773a839b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 18 Apr 2020 20:20:21 +0200 Subject: Support for method annotations for compiler plugin (#142) --- .../pl/treksoft/kvision/annotations/Annotations.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'kvision-modules/kvision-common-annotations/src/commonMain/kotlin/pl') diff --git a/kvision-modules/kvision-common-annotations/src/commonMain/kotlin/pl/treksoft/kvision/annotations/Annotations.kt b/kvision-modules/kvision-common-annotations/src/commonMain/kotlin/pl/treksoft/kvision/annotations/Annotations.kt index 22cf570b..077606d1 100644 --- a/kvision-modules/kvision-common-annotations/src/commonMain/kotlin/pl/treksoft/kvision/annotations/Annotations.kt +++ b/kvision-modules/kvision-common-annotations/src/commonMain/kotlin/pl/treksoft/kvision/annotations/Annotations.kt @@ -21,5 +21,22 @@ */ package pl.treksoft.kvision.annotations +enum class Method { + GET, + POST, + PUT, + DELETE, + OPTIONS +} + @Target(AnnotationTarget.CLASS) annotation class KVService + +@Target(AnnotationTarget.FUNCTION) +annotation class KVBinding(val method: Method, val route: String) + +@Target(AnnotationTarget.FUNCTION) +annotation class KVBindingMethod(val method: Method) + +@Target(AnnotationTarget.FUNCTION) +annotation class KVBindingRoute(val route: String) -- cgit