summaryrefslogtreecommitdiffstats
path: root/src/main/scala/cake/services.scala
blob: b1711654ee31b97a78665b4e4a6dbe35ebf9d43b (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
package cake.services

trait HasApplication {
  type ApplicationType
  val application: ApplicationType with IApplication
  trait IApplication {
    def run (): Unit
  }
}

trait HasDatabase {
  type DatabaseType
  val database: DatabaseType with IDatabase
  trait IDatabase {
    def query (search: String): String
  }
}

trait HasLogger {
  type LoggerType
  val logger: LoggerType with ILogger
  trait ILogger {
    def log (msg: String): Unit
  }
}