add information about content client provider to readme

This commit is contained in:
2022-03-18 00:04:04 +06:00
parent 1dafe0a679
commit 709e7a8583
11 changed files with 122 additions and 56 deletions
features
common
README.md
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
content
README.md
binary
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
text
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
publicators/simple/server/src/jvmMain/kotlin/dev/inmo/postssystem/publicators/simple/server
server
src
main
java
dev
inmo
postssystem
test.config.json
targets/telegram/loader/server/src/jvmMain/kotlin/dev/inmo/postssystem/targets/telegram/loader/server

26
features/common/README.md Normal file

@ -0,0 +1,26 @@
# Common
In that readme will be stored several notes about working with common parts in all your modules
## ModuleLoader
This module has been created to allow your plugins to load dynamically after build of the server and client
### Server
To declare your module loader you should create **_class_** realization of `ServerModuleLoader` and put the classname of that
realization into the `modules` section as a string.
### Client
On the client side you also should create your own realization of `ModuleLoader`, but instead of some config you will
need to create some `private val` property on the top level in your `ModuleLoader` realization file. Example:
```kotlin
object SomeModuleLoader : ModuleLoader {
// body
}
private val someModuleLoaderProperty = AdditionalModules.addModule(SomeModuleLoader) // that is important part
```

@ -0,0 +1,15 @@
package dev.inmo.postssystem.features.common.server.sessions
import org.koin.core.qualifier.StringQualifier
object Qualifiers {
val binaryFilesFolderQualifier = StringQualifier("binaryFilesFolder")
val originalFilesMetasKeyValueRepoQualifier = StringQualifier("OriginalFilesMetaKV")
val binaryOriginalFilesMetasKeyValueRepoQualifier = StringQualifier("BinaryOriginalFilesMetaKV")
val commonFilesMetasKeyValueRepoQualifier = StringQualifier("CommonFilesMetaKV")
val binaryFilesMetasKeyValueRepoQualifier = StringQualifier("BinaryFilesMetaKV")
val filesFolderQualifier = StringQualifier("rootFilesFolder")
val commonFilesFolderQualifier = StringQualifier("commonFilesFolder")
val usersRolesKeyValueFactoryQualifier = StringQualifier("usersRolesKeyValueFactory")
val binaryStorageFilesQualifier = StringQualifier("binaryContentFiles")
}

@ -3,6 +3,6 @@ package dev.inmo.postssystem.features.common.server.sessions
import kotlinx.serialization.json.JsonObject
import org.koin.core.module.Module
interface ModuleLoader {
interface ServerModuleLoader {
fun Module.load(config: JsonObject)
}