commonMain.net.folivo.trixnity.client.store.createStoreModule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trixnity-client-jvm Show documentation
Show all versions of trixnity-client-jvm Show documentation
Multiplatform Kotlin SDK for matrix-protocol
package net.folivo.trixnity.client.store
import net.folivo.trixnity.client.media.MediaStore
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.bind
import org.koin.dsl.module
fun createStoreModule() = module {
singleOf(::TransactionManagerImpl).bind()
singleOf(::AccountStore)
singleOf(::GlobalAccountDataStore)
single {
KeyStore(
outdatedKeysRepository = get(),
deviceKeysRepository = get(),
crossSigningKeysRepository = get(),
keyVerificationStateRepository = get(),
keyChainLinkRepository = get(),
secretsRepository = get(),
secretKeyRequestRepository = get(),
roomKeyRequestRepository = get(),
tm = get(),
config = get(),
storeScope = get()
)
}
singleOf(::MediaCacheMappingStore)
singleOf(::OlmCryptoStore)
singleOf(::RoomAccountDataStore)
singleOf(::RoomOutboxMessageStore)
singleOf(::RoomStateStore)
singleOf(::RoomStore)
singleOf(::RoomTimelineStore)
singleOf(::RoomUserStore)
single {
RootStore(
listOfNotNull(
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
getOrNull(),
)
)
}
}