com.lightningkite.lightningdb.HealthCheckTestModelFields.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-core Show documentation
Show all versions of server-core Show documentation
A set of tools to fill in/replace what Ktor is lacking in.
The newest version!
@file:OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
package com.lightningkite.lightningdb
import com.lightningkite.lightningserver.metrics.Metricable
import com.lightningkite.lightningserver.serverhealth.HealthCheckable
import com.lightningkite.lightningserver.serverhealth.HealthStatus
import kotlinx.serialization.Serializable
import kotlin.reflect.KType
import kotlin.reflect.typeOf
import com.lightningkite.lightningdb.*
import kotlin.reflect.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.*
import kotlinx.serialization.internal.GeneratedSerializer
import java.time.*
import java.util.*
fun prepareHealthCheckTestModelFields() {
HealthCheckTestModel::_id.setCopyImplementation { original, value -> original.copy(_id = value) }
}
val DataClassPath._id: DataClassPath get() = this[HealthCheckTestModel::_id]
inline val HealthCheckTestModel.Companion.path: DataClassPath get() = path()