This commit is contained in:
2025-12-08 20:46:47 +01:00
parent 21ee130ebf
commit f0d85aa4da
16 changed files with 444 additions and 17 deletions
@@ -0,0 +1,45 @@
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
}
group = "at.mocode"
version = "1.0.0"
kotlin {
val enableWasm = providers.gradleProperty("enableWasm").orNull == "true"
// Align the toolchain with a project (see composeApp uses 21)
jvmToolchain(21)
// JVM target for backend usage
jvm()
// JS target for frontend usage (Compose/Browser)
js {
browser()
// no need for binaries.executable() in a library
}
// Optional Wasm target for browser clients
if (enableWasm) {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
wasmJs {
browser()
}
}
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlinx.serialization.json)
}
}
commonTest {
dependencies {
implementation(libs.kotlin.test)
}
}
}
}
@@ -0,0 +1,5 @@
package at.mocode.entries.api
interface EntriesApi {
suspend fun healthCheck(): HealthResponse
}
@@ -0,0 +1,23 @@
package at.mocode.entries.api
import kotlinx.serialization.Serializable
@Serializable
data class EntriesResponse(val status: String, val timestamp: String, val service: String)
@Serializable
data class EnhancedEntriesResponse(
val status: String,
val timestamp: String,
val service: String,
val circuitBreakerState: String,
val responseTime: Long
)
@Serializable
data class HealthResponse(
val status: String,
val timestamp: String,
val service: String,
val healthy: Boolean
)