diff options
author | Robert Jaros <rjaros@finn.pl> | 2020-04-18 20:20:21 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2020-04-18 20:20:21 +0200 |
commit | 80f33eae37fff276f538ce43d2b0e18f773a839b (patch) | |
tree | 1c788e268e7042656db9cc4a62592d890fe12f53 /kvision-modules/kvision-common-annotations | |
parent | 7b994ca5d71f195781ac129f3d3d180fb79c7380 (diff) | |
download | kvision-80f33eae37fff276f538ce43d2b0e18f773a839b.tar.gz kvision-80f33eae37fff276f538ce43d2b0e18f773a839b.tar.bz2 kvision-80f33eae37fff276f538ce43d2b0e18f773a839b.zip |
Support for method annotations for compiler plugin (#142)
Diffstat (limited to 'kvision-modules/kvision-common-annotations')
-rw-r--r-- | kvision-modules/kvision-common-annotations/src/commonMain/kotlin/pl/treksoft/kvision/annotations/Annotations.kt | 17 |
1 files changed, 17 insertions, 0 deletions
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) |