Replace flows due to their logical placement in aggregator of read and write interfaces
This commit is contained in:
parent
4e77e242fe
commit
1dfc225133
@ -1,7 +1,6 @@
|
|||||||
package com.insanusmokrassar.postssystem.core.content
|
package com.insanusmokrassar.postssystem.core.content
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.internal.*
|
|
||||||
|
|
||||||
typealias ContentId = String
|
typealias ContentId = String
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
package com.insanusmokrassar.postssystem.core.content.api
|
package com.insanusmokrassar.postssystem.core.content.api
|
||||||
|
|
||||||
interface ContentAPI : ReadContentAPI, WriteContentAPI
|
import com.insanusmokrassar.postssystem.core.content.RegisteredContent
|
||||||
|
import kotlinx.coroutines.flow.Flow
|
||||||
|
|
||||||
|
interface ContentAPI : ReadContentAPI, WriteContentAPI {
|
||||||
|
val contentCreatedFlow: Flow<RegisteredContent>
|
||||||
|
val contentDeletedFlow: Flow<RegisteredContent>
|
||||||
|
}
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
package com.insanusmokrassar.postssystem.core.content.api
|
package com.insanusmokrassar.postssystem.core.content.api
|
||||||
|
|
||||||
import com.insanusmokrassar.postssystem.core.content.*
|
import com.insanusmokrassar.postssystem.core.content.*
|
||||||
import kotlinx.coroutines.flow.Flow
|
|
||||||
|
|
||||||
interface WriteContentAPI {
|
interface WriteContentAPI {
|
||||||
val contentCreatedFlow: Flow<RegisteredContent>
|
|
||||||
val contentDeletedFlow: Flow<RegisteredContent>
|
|
||||||
|
|
||||||
suspend fun createContent(content: Content): RegisteredContent?
|
suspend fun createContent(content: Content): RegisteredContent?
|
||||||
suspend fun deleteContent(id: ContentId): Boolean
|
suspend fun deleteContent(id: ContentId): Boolean
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
package com.insanusmokrassar.postssystem.core.post.api
|
package com.insanusmokrassar.postssystem.core.post.api
|
||||||
|
|
||||||
interface PostsAPI : ReadPostsAPI, WritePostsAPI
|
import com.insanusmokrassar.postssystem.core.post.RegisteredPost
|
||||||
|
import kotlinx.coroutines.flow.Flow
|
||||||
|
|
||||||
|
interface PostsAPI : ReadPostsAPI, WritePostsAPI {
|
||||||
|
val postCreatedFlow: Flow<RegisteredPost>
|
||||||
|
val postDeletedFlow: Flow<RegisteredPost>
|
||||||
|
val postUpdatedFlow: Flow<RegisteredPost>
|
||||||
|
}
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
package com.insanusmokrassar.postssystem.core.post.api
|
package com.insanusmokrassar.postssystem.core.post.api
|
||||||
|
|
||||||
import com.insanusmokrassar.postssystem.core.post.*
|
import com.insanusmokrassar.postssystem.core.post.*
|
||||||
import kotlinx.coroutines.flow.Flow
|
|
||||||
|
|
||||||
interface WritePostsAPI {
|
interface WritePostsAPI {
|
||||||
val postCreatedFlow: Flow<RegisteredPost>
|
|
||||||
val postDeletedFlow: Flow<RegisteredPost>
|
|
||||||
val postUpdatedFlow: Flow<RegisteredPost>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For creating of post you need to create all its [com.insanusmokrassar.postssystem.core.content.RegisteredContent]
|
* For creating of post you need to create all its [com.insanusmokrassar.postssystem.core.content.RegisteredContent]
|
||||||
* and (or just) retrieve their [ContentIds] and put it into some [Post] implementation line [SimplePost]
|
* and (or just) retrieve their [ContentIds] and put it into some [Post] implementation line [SimplePost]
|
||||||
|
Loading…
Reference in New Issue
Block a user