2016-08-22 16:05:10 -06:00
|
|
|
package lila.event
|
|
|
|
|
2019-11-30 00:34:21 -07:00
|
|
|
import play.api.Configuration
|
2019-11-30 18:00:44 -07:00
|
|
|
import com.softwaremill.macwire._
|
2019-11-30 00:34:21 -07:00
|
|
|
|
2019-11-30 18:00:44 -07:00
|
|
|
import lila.common.config.CollName
|
2019-11-30 00:34:21 -07:00
|
|
|
import lila.common.config._
|
2016-08-22 16:05:10 -06:00
|
|
|
|
|
|
|
final class Env(
|
2019-11-30 00:34:21 -07:00
|
|
|
appConfig: Configuration,
|
2019-12-06 20:37:15 -07:00
|
|
|
db: lila.db.Db,
|
2019-12-23 18:01:45 -07:00
|
|
|
cacheApi: lila.memo.CacheApi
|
2019-12-13 20:08:21 -07:00
|
|
|
)(implicit ec: scala.concurrent.ExecutionContext) {
|
2016-08-22 16:05:10 -06:00
|
|
|
|
2019-11-30 00:34:21 -07:00
|
|
|
private lazy val eventColl = db(appConfig.get[CollName]("event.collection.event"))
|
2016-08-22 16:05:10 -06:00
|
|
|
|
2019-11-30 18:00:44 -07:00
|
|
|
lazy val api = wire[EventApi]
|
2016-08-22 16:05:10 -06:00
|
|
|
}
|