Skip to content

Commit

Permalink
Add configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
TomJKing committed Jun 11, 2024
1 parent 4691cc1 commit c24e8e6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ lazy val root = (project in file("."))
http4sEmberServer,
logbackClassic,
logBackEncoder,
pureConfig,
pureConfigCatsEffect,
scalaTest
)
)
Expand Down
4 changes: 4 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import sbt.*

object Dependencies {
private val http4sVersion = "0.23.26"
private val pureConfigVersion = "0.17.6"

lazy val catsEffect = "org.typelevel" %% "cats-effect" % "3.5.4"

Expand All @@ -11,5 +12,8 @@ object Dependencies {
lazy val logBackEncoder = "net.logstash.logback" % "logstash-logback-encoder" % "7.4"
lazy val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.5.6"

lazy val pureConfig = "com.github.pureconfig" %% "pureconfig" % pureConfigVersion
lazy val pureConfigCatsEffect = "com.github.pureconfig" %% "pureconfig-cats-effect" % pureConfigVersion

lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.2.18"
}
5 changes: 5 additions & 0 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
auth {
url = "https://auth.tdr-integration.nationalarchives.gov.uk"
url = ${?AUTH_URL}
realm = "tdr"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package uk.gov.nationalarchives.tdr.transfer.service

object Config {
case class Auth(url: String, realm: String)

case class Configuration(auth: Auth)
}
4 changes: 4 additions & 0 deletions src/test/resources/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
auth {
url = "http://localhost:8000/auth"
realm = "tdr"
}

0 comments on commit c24e8e6

Please sign in to comment.