Package dev.inmo.micro_utils.ktor.server

Types

Link copied to clipboard
class TemporalFilesRoutingConfigurator(    subpath: String = DefaultTemporalFilesSubPath,     unifiedRouter: UnifiedRouter = UnifiedRouter.default,     temporalFilesUtilizer: TemporalFilesRoutingConfigurator.TemporalFilesUtilizer = TemporalFilesUtilizer) : ApplicationRoutingConfigurator.Element
Link copied to clipboard
class UnifiedRouter(val serialFormat: <ERROR CLASS> = standardKtorSerialFormat, val serialFormatContentType: <ERROR CLASS> = standardKtorSerialFormatContentType)

Functions

Link copied to clipboard
fun createKtorServer(    host: String = "localhost",     port: Int = Random.nextInt(1024, 65535),     additionalEngineEnvironmentConfigurator: <ERROR CLASS>.() -> Unit = {},     additionalConfigurationConfigurator: <ERROR CLASS>.() -> Unit = {},     block: <ERROR CLASS>.() -> Unit): <ERROR CLASS>
fun createKtorServer(    host: String = "localhost",     port: Int = Random.nextInt(1024, 65535),     configurators: List<KtorApplicationConfigurator>,     additionalEngineEnvironmentConfigurator: <ERROR CLASS>.() -> Unit = {},     additionalConfigurationConfigurator: <ERROR CLASS>.() -> Unit = {}): <ERROR CLASS>

Create server with CIO server engine without starting of it

fun <TEngine, TConfiguration> createKtorServer(    engine: <ERROR CLASS><TEngine, TConfiguration>,     host: String = "localhost",     port: Int = Random.nextInt(1024, 65535),     additionalEngineEnvironmentConfigurator: <ERROR CLASS>.() -> Unit = {},     additionalConfigurationConfigurator: TConfiguration.() -> Unit = {},     block: <ERROR CLASS>.() -> Unit): TEngine
fun <TEngine, TConfiguration> createKtorServer(    engine: <ERROR CLASS><TEngine, TConfiguration>,     host: String = "localhost",     port: Int = Random.nextInt(1024, 65535),     additionalEngineEnvironmentConfigurator: <ERROR CLASS>.() -> Unit = {},     additionalConfigurationConfigurator: TConfiguration.() -> Unit = {},     configurators: List<KtorApplicationConfigurator>): TEngine
Link copied to clipboard
fun <T> <ERROR CLASS>.decodeUrlQueryValue(field: String, deserializer: <ERROR CLASS><T>): <ERROR CLASS>
Link copied to clipboard
suspend fun <T> <ERROR CLASS>.decodeUrlQueryValueOrSendError(field: String, deserializer: <ERROR CLASS><T>): <ERROR CLASS>
Link copied to clipboard
suspend fun <ERROR CLASS>.getParameterOrSendError(field: String): <ERROR CLASS>
Link copied to clipboard
fun <ERROR CLASS>.getQueryParameter(field: String): <ERROR CLASS>
Link copied to clipboard
suspend fun <ERROR CLASS>.getQueryParameterOrSendError(field: String): <ERROR CLASS>
Link copied to clipboard
inline fun <T : Any> <ERROR CLASS>.includeWebsocketHandling(    suburl: String,     flow: Flow<T>,     protocol: <ERROR CLASS>? = null,     noinline dataMapper: suspend <ERROR CLASS>.(T) -> T? = { it })
fun <T> <ERROR CLASS>.includeWebsocketHandling(    suburl: String,     flow: Flow<T>,     serializer: <ERROR CLASS><T>,     serialFormat: <ERROR CLASS> = standardKtorSerialFormat,     protocol: <ERROR CLASS>? = null,     filter: suspend <ERROR CLASS>.(T) -> Boolean? = null): <ERROR CLASS>
Link copied to clipboard
suspend fun <T : Any> <ERROR CLASS>.respond(message: T, typeInfo: <ERROR CLASS>)
Link copied to clipboard
suspend fun <T> <ERROR CLASS>.unianswer(answerSerializer: <ERROR CLASS><T>, answer: T)
Link copied to clipboard
suspend fun <T> <ERROR CLASS>.uniload(deserializer: <ERROR CLASS><T>): <ERROR CLASS>
Link copied to clipboard
suspend fun <ERROR CLASS>.uniloadMultipart(    onFormItem: (<ERROR CLASS>) -> Unit = {},     onCustomFileItem: (<ERROR CLASS>) -> Unit = {},     onBinaryContent: (<ERROR CLASS>) -> Unit = {}): <ERROR CLASS>
suspend fun <T> <ERROR CLASS>.uniloadMultipart(    deserializer: <ERROR CLASS><T>,     onFormItem: (<ERROR CLASS>) -> Unit = {},     onCustomFileItem: (<ERROR CLASS>) -> Unit = {},     onBinaryContent: (<ERROR CLASS>) -> Unit = {}): Pair<<ERROR CLASS>, T>
Link copied to clipboard
suspend fun <ERROR CLASS>.uniloadMultipartFile(    onFormItem: (<ERROR CLASS>) -> Unit = {},     onCustomFileItem: (<ERROR CLASS>) -> Unit = {},     onBinaryContent: (<ERROR CLASS>) -> Unit = {}): <ERROR CLASS>
suspend fun <T> <ERROR CLASS>.uniloadMultipartFile(    deserializer: <ERROR CLASS><T>,     onFormItem: (<ERROR CLASS>) -> Unit = {},     onCustomFileItem: (<ERROR CLASS>) -> Unit = {},     onBinaryContent: (<ERROR CLASS>) -> Unit = {}): <ERROR CLASS>

Properties

Link copied to clipboard
val defaultUnifiedRouter: UnifiedRouter
Link copied to clipboard
val <ERROR CLASS>.extractFromToDateTime: FromToDateTime
Link copied to clipboard
val standardKtorSerialFormatContentType: <ERROR CLASS>