add integration with posts creating
This commit is contained in:
client
features/content
binary
common
src
commonMain
kotlin
dev
inmo
postssystem
features
content
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
content
binary
common
src
commonMain
kotlin
dev
inmo
postssystem
features
content
common
server
services/posts
client
src
commonMain
kotlin
dev
inmo
postssystem
services
common
server
@ -3,6 +3,7 @@ package dev.inmo.postssystem.features.content.common
|
||||
import dev.inmo.micro_utils.common.FileName
|
||||
import dev.inmo.micro_utils.mime_types.MimeType
|
||||
import dev.inmo.postssystem.features.common.common.SimpleInputProvider
|
||||
import kotlinx.serialization.PolymorphicSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@ -26,11 +27,13 @@ interface SimpleContent : Content
|
||||
/**
|
||||
* This type represents some binary data which can be sent with multipart and deserialized from it
|
||||
*/
|
||||
interface BinaryContent : Content {
|
||||
val filename: FileName
|
||||
val mimeType: MimeType
|
||||
data class BinaryContent(
|
||||
val filename: FileName,
|
||||
val mimeType: MimeType,
|
||||
val inputProvider: SimpleInputProvider
|
||||
}
|
||||
) : Content
|
||||
|
||||
val ContentSerializer = PolymorphicSerializer(Content::class)
|
||||
|
||||
/**
|
||||
* Content which is already registered in database. Using its [id] you can retrieve all known
|
||||
|
Reference in New Issue
Block a user