micro_utils.dokka
0.15.1

# Package-level declarations

## Types

OnUploadCallback
Link copied to clipboard
typealias OnUploadCallback = suspend (uploaded: Long, count: Long) -> Unit
UniUploadFileInfo
Link copied to clipboard
data class UniUploadFileInfo(val fileName: FileName, val mimeType: String, val inputAllocator: LambdaInputProvider)

## Functions

bodyOrNull
Link copied to clipboard
inline suspend fun <T : Any> <Error class: unknown class>.bodyOrNull(): <Error class: unknown class>?
createStandardWebsocketFlow
Link copied to clipboard
inline fun <T : Any> <Error class: unknown class>.createStandardWebsocketFlow(url: String, noinline checkReconnection: suspend (Throwable?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow<T>
inputProvider
Link copied to clipboard
expect suspend fun MPPFile.inputProvider(): <Error class: unknown class>
inputProviderSync
Link copied to clipboard
fun MPPFile.inputProviderSync(): <Error class: unknown class>
fun MPPFile.inputProviderSync(): <Error class: unknown class>
openBaseWebSocketFlow
Link copied to clipboard
inline fun <T : Any> openBaseWebSocketFlow(noinline checkReconnection: suspend (Throwable?) -> Boolean = { true }, noinline webSocketSessionRequest: suspend SendChannel<T>.() -> Unit): Flow<T>
openSecureWebSocketFlow
Link copied to clipboard
inline fun <T : Any> <Error class: unknown class>.openSecureWebSocketFlow(url: String, noinline checkReconnection: suspend (Throwable?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow<T>
openWebSocketFlow
Link copied to clipboard
inline fun <T : Any> <Error class: unknown class>.openWebSocketFlow(url: String, noinline checkReconnection: suspend (Throwable?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow<T>
inline fun <T : Any> <Error class: unknown class>.openWebSocketFlow(url: String, useSecureConnection: Boolean, noinline checkReconnection: suspend (Throwable?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow<T>
tempUpload
Link copied to clipboard
expect suspend fun <Error class: unknown class>.tempUpload(fullTempUploadDraftPath: String, file: MPPFile, onUpload: OnUploadCallback = { _, _ -> }): TemporalFileId
throwOnUnsuccess
Link copied to clipboard
inline fun <Error class: unknown class>.throwOnUnsuccess(unsuccessMessage: () -> String)
uniUpload
Link copied to clipboard
expect suspend fun <T> <Error class: unknown class>.uniUpload(url: String, data: Map<String, Any>, resultDeserializer: DeserializationStrategy<T>, headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: OnUploadCallback = { _, _ -> }): T?

Will execute submitting of multipart data request

suspend fun <T> <Error class: unknown class>.uniUpload(url: String, file: MPPFile, resultDeserializer: DeserializationStrategy<T>, additionalData: Map<String, Any> = emptyMap(), headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: OnUploadCallback = { _, _ -> }): T?

Additional variant of uniUpload which will unify sending of some MPPFile with the server

suspend fun <T> <Error class: unknown class>.uniUpload(url: String, info: UniUploadFileInfo, resultDeserializer: DeserializationStrategy<T>, additionalData: Map<String, Any> = emptyMap(), headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: OnUploadCallback = { _, _ -> }): T?

Additional variant of uniUpload which will unify sending of some UniUploadFileInfo with the server

suspend fun <T> <Error class: unknown class>.uniUpload(url: String, fileName: FileName, mimeType: String, inputAllocator: LambdaInputProvider, resultDeserializer: DeserializationStrategy<T>, additionalData: Map<String, Any> = emptyMap(), headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: OnUploadCallback = { _, _ -> }): T?

Additional variant of uniUpload which will unify sending of some UniUploadFileInfo (built from fileName, mimeType and inputAllocator) with the server