blob: 7b609ee00ebe4c98271ab2d437a56f6267b74808 (
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
|
package cask.main
import cask.router.RoutesEndpointsMetadata
import language.experimental.macros
trait Routes{
def decorators = Seq.empty[cask.router.Decorator[_, _, _]]
implicit val actorContext = new castor.Context.Simple(
concurrent.ExecutionContext.Implicits.global,
log.exception
)
private[this] var metadata0: RoutesEndpointsMetadata[this.type] = null
def caskMetadata =
if (metadata0 != null) metadata0
else throw new Exception("Routes not yet initialize")
protected[this] def initialize()(implicit routes: RoutesEndpointsMetadata[this.type]): Unit = {
metadata0 = routes
}
implicit def log: cask.util.Logger
}
|