summaryrefslogtreecommitdiffstats
path: root/src/main/scala/myapp/cake/services.scala
blob: 99be3d5effa88883462f632442c017672eba2f28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package myapp.cake.services

import myapp.database.Database
import myapp.logger.Logger

trait HasApplication {
  type ApplicationType

  val application: ApplicationType with ApplicationService

  trait ApplicationService {
    def run (): Unit
  }
}

trait HasDatabase {
  type DatabaseType

  val database: DatabaseType with DatabaseService

  trait DatabaseService extends Database
}

trait HasLogger {
  type LoggerType

  val logger: LoggerType with LoggerService

  trait LoggerService extends Logger
}