modules.BakuModule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of baku Show documentation
Show all versions of baku Show documentation
helps you focus your REST API back-end on the business logic
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