modules.BakuModule.kt Maven / Gradle / Ivy
package com.github.fluidsonic.baku
import io.ktor.application.ApplicationCall
import io.ktor.application.call
import io.ktor.util.pipeline.PipelineContext
abstract class BakuModule {
internal fun configure() =
BakuModuleConfiguration(this).apply { configure() }
abstract fun BakuModuleConfiguration.configure()
@Suppress("UNCHECKED_CAST")
val ApplicationCall.transaction
get() = attributes[BakuTransactionFeature.transactionAttributeKey] as Transaction
val PipelineContext<*, ApplicationCall>.transaction
get() = call.transaction
}
val ApplicationCall.transaction
get() = attributes[BakuTransactionFeature.transactionAttributeKey]
val PipelineContext<*, ApplicationCall>.transaction
get() = call.transaction