Slide 53
Slide 53 text
DISettings
...
private[adapters] def designOfRepositories: Design = newDesign.bind[AccountRepository[Effect]].to[AccountRepositoryBySlick]
private[adapters] def designOfServices: Design = newDesign.bind[EncryptService[Effect]].to[EncryptServiceOnBCrypt]
def design(environment: AppType, jwtSecret: String, jwtConfig: JwtConfig): Design =
designOfRuntime(environment)
.add(designOfSlick(environment.rdbService.profile, environment.rdbService.db))
.add(designOfRepositories)
.add(designOfJwtConfig(jwtSecret, jwtConfig))
.add(designOfServices)
Bind an entity such as Repository.
If you know the default value without binding on Design side, it will build.
UseCase, Presenter, Controller, etc. are set to automatic build.
Clean Architecture in Practice
2019 ScalaMatsuri
Repository
などの実体をbind
する。Design
側でbind
しなくてもデフォルトの値が分かる場合はbuild
してくれる。UseCase
、
48 / 52