Move file and add interface to improve Archi Hexa
This commit is contained in:
@@ -2,7 +2,7 @@ package eventDemo.configuration
|
||||
|
||||
import com.auth0.jwt.JWT
|
||||
import com.auth0.jwt.algorithms.Algorithm
|
||||
import eventDemo.app.entity.Player
|
||||
import eventDemo.business.entity.Player
|
||||
import io.ktor.http.HttpStatusCode
|
||||
import io.ktor.server.application.Application
|
||||
import io.ktor.server.application.call
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
package eventDemo.configuration
|
||||
|
||||
import eventDemo.app.command.GameCommandActionRunner
|
||||
import eventDemo.app.command.GameCommandHandler
|
||||
import eventDemo.app.command.command.GameCommand
|
||||
import eventDemo.app.event.GameEventBus
|
||||
import eventDemo.app.event.GameEventHandler
|
||||
import eventDemo.app.event.GameEventStore
|
||||
import eventDemo.app.event.projection.GameStateRepository
|
||||
import eventDemo.app.event.projection.SnapshotConfig
|
||||
import eventDemo.app.eventListener.PlayerNotificationEventListener
|
||||
import eventDemo.adapter.infrastructureLayer.event.GameEventBusInMemory
|
||||
import eventDemo.adapter.infrastructureLayer.event.GameEventStoreInMemory
|
||||
import eventDemo.adapter.infrastructureLayer.event.projection.GameStateRepositoryInMemory
|
||||
import eventDemo.business.command.GameCommandActionRunner
|
||||
import eventDemo.business.command.GameCommandHandler
|
||||
import eventDemo.business.command.command.GameCommand
|
||||
import eventDemo.business.event.GameEventBus
|
||||
import eventDemo.business.event.GameEventHandler
|
||||
import eventDemo.business.event.GameEventStore
|
||||
import eventDemo.business.event.eventListener.PlayerNotificationEventListener
|
||||
import eventDemo.business.event.projection.GameStateRepository
|
||||
import eventDemo.libs.command.CommandRunnerController
|
||||
import eventDemo.libs.command.CommandStreamChannel
|
||||
import eventDemo.libs.event.EventBusInMemory
|
||||
import eventDemo.libs.event.EventStoreInMemory
|
||||
import eventDemo.libs.event.VersionBuilder
|
||||
import eventDemo.libs.event.VersionBuilderLocal
|
||||
import eventDemo.libs.event.projection.SnapshotConfig
|
||||
import io.ktor.server.application.Application
|
||||
import io.ktor.server.application.install
|
||||
import org.koin.core.module.dsl.singleOf
|
||||
@@ -33,14 +34,17 @@ fun Application.configureKoin() {
|
||||
val appKoinModule =
|
||||
module {
|
||||
single {
|
||||
GameEventBus(EventBusInMemory())
|
||||
}
|
||||
GameEventBusInMemory()
|
||||
} bind GameEventBus::class
|
||||
|
||||
single {
|
||||
GameEventStore(EventStoreInMemory())
|
||||
}
|
||||
GameEventStoreInMemory()
|
||||
} bind GameEventStore::class
|
||||
|
||||
single {
|
||||
GameStateRepository(get(), get(), snapshotConfig = SnapshotConfig())
|
||||
}
|
||||
GameStateRepositoryInMemory(get(), get(), snapshotConfig = SnapshotConfig())
|
||||
} bind GameStateRepository::class
|
||||
|
||||
single {
|
||||
CommandStreamChannel<GameCommand>(get())
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package eventDemo.configuration
|
||||
|
||||
import eventDemo.app.command.action.ICantPlay
|
||||
import eventDemo.app.command.action.IWantToJoinTheGame
|
||||
import eventDemo.app.command.action.IWantToPlayCard
|
||||
import eventDemo.app.command.action.IamReadyToPlay
|
||||
import eventDemo.business.command.action.ICantPlay
|
||||
import eventDemo.business.command.action.IWantToJoinTheGame
|
||||
import eventDemo.business.command.action.IWantToPlayCard
|
||||
import eventDemo.business.command.action.IamReadyToPlay
|
||||
import org.koin.core.module.Module
|
||||
import org.koin.core.module.dsl.singleOf
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package eventDemo.configuration
|
||||
|
||||
import eventDemo.app.eventListener.ReactionEventListener
|
||||
import eventDemo.business.event.eventListener.ReactionEventListener
|
||||
import io.ktor.server.application.Application
|
||||
import org.koin.ktor.ext.get
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package eventDemo.configuration
|
||||
|
||||
import eventDemo.app.entity.GameId
|
||||
import eventDemo.app.entity.Player
|
||||
import eventDemo.business.entity.GameId
|
||||
import eventDemo.business.entity.Player
|
||||
import eventDemo.libs.command.CommandId
|
||||
import io.ktor.serialization.kotlinx.json.json
|
||||
import io.ktor.server.application.Application
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package eventDemo.configuration
|
||||
|
||||
import eventDemo.app.query.readTheGameState
|
||||
import eventDemo.adapter.interfaceLayer.readTheGameState
|
||||
import io.ktor.server.application.Application
|
||||
import io.ktor.server.routing.routing
|
||||
import org.koin.ktor.ext.get
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package eventDemo.configuration
|
||||
|
||||
import eventDemo.app.command.GameCommandHandler
|
||||
import eventDemo.app.command.gameWebSocket
|
||||
import eventDemo.app.eventListener.PlayerNotificationEventListener
|
||||
import eventDemo.adapter.interfaceLayer.gameWebSocket
|
||||
import eventDemo.business.command.GameCommandHandler
|
||||
import eventDemo.business.event.eventListener.PlayerNotificationEventListener
|
||||
import io.ktor.server.application.Application
|
||||
import io.ktor.server.routing.routing
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
|
||||
Reference in New Issue
Block a user