add target and telegram target
This commit is contained in:
@@ -12,6 +12,7 @@ kotlin {
|
||||
dependencies {
|
||||
api project(":postssystem.features.common.common")
|
||||
api project(":postssystem.features.content.common")
|
||||
api "dev.inmo:micro_utils.mime_types:$microutils_version"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,14 @@
|
||||
package dev.inmo.postssystem.features.content.binary.common
|
||||
|
||||
import dev.inmo.micro_utils.common.ByteArrayAllocator
|
||||
import dev.inmo.micro_utils.common.FileName
|
||||
import dev.inmo.micro_utils.mime_types.MimeType
|
||||
import dev.inmo.postssystem.features.content.common.Content
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BinaryContent(
|
||||
val bytes: ByteArray
|
||||
) : Content
|
||||
val filename: FileName,
|
||||
val mimeType: MimeType,
|
||||
val bytesAllocator: ByteArrayAllocator
|
||||
) : Content
|
||||
|
@@ -2,7 +2,8 @@ package dev.inmo.postssystem.features.content.common
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
typealias ContentId = String
|
||||
@Serializable
|
||||
value class ContentId(val string: String)
|
||||
|
||||
/**
|
||||
* Content which is planned to be registered in database
|
||||
|
@@ -0,0 +1,6 @@
|
||||
package dev.inmo.postssystem.features.content.server
|
||||
|
||||
import dev.inmo.micro_utils.repos.CRUDRepo
|
||||
import dev.inmo.postssystem.features.content.common.*
|
||||
|
||||
interface ServerContentStorage : ServerReadContentStorage, ServerWriteContentStorage, CRUDRepo<RegisteredContent, ContentId, Content>
|
@@ -0,0 +1,7 @@
|
||||
package dev.inmo.postssystem.features.content.server
|
||||
|
||||
import dev.inmo.micro_utils.repos.ReadCRUDRepo
|
||||
import dev.inmo.postssystem.features.content.common.ContentId
|
||||
import dev.inmo.postssystem.features.content.common.RegisteredContent
|
||||
|
||||
interface ServerReadContentStorage : ReadCRUDRepo<RegisteredContent, ContentId>
|
@@ -0,0 +1,6 @@
|
||||
package dev.inmo.postssystem.features.content.server
|
||||
|
||||
import dev.inmo.micro_utils.repos.WriteCRUDRepo
|
||||
import dev.inmo.postssystem.features.content.common.*
|
||||
|
||||
interface ServerWriteContentStorage : WriteCRUDRepo<RegisteredContent, ContentId, Content>
|
Reference in New Issue
Block a user