trait DIConfigReader[A] extends AbstractDIConfigReader[A]
Config reader that uses a pureconfig.ConfigReader implicit instance for a type to decode it from Typesafe Config.
Always automatically derives a codec if it's not available.
Automatic derivation will use **camelCase
** fields, NOT kebab-case
fields,
as in default pureconfig. It also overrides pureconfig's default type
field
type discriminator for sealed traits, instead using a circe
-like format with a single-key object.
Example:
sealed trait AorB final case class A(a: Int) extends AorB final case class B(b: String) extends AorB final case class Config(values: List[AorB])
In config:
config {
values = [
{ A { a = 123 } },
{ B { b = cba } }
]
}
Auto-derivation will work without importing pureconfig.generic.auto._
and without any other imports
You may use izumi.distage.config.codec.PureconfigAutoDerive f you want to use DIConfigReader
's deriving strategy to derive a standalone pureconfig
codec:
final case class Abc(a: Duration, b: Regex, c: URL) object Abc { implicit val configReader: pureconfig.ConfigReader[Abc] = PureconfigAutoDerive[Abc] }
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- DIConfigReader
- AbstractDIConfigReader
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Abstract Value Members
- abstract def decodeConfigValue(configValue: ConfigValue): Try[A]
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def decodeAppConfig(path: String)(implicit tag: Tag[A]): (AppConfig) => A
- Definition Classes
- AbstractDIConfigReader
- final def decodeAppConfigWithDefault(path: String)(default: => A)(implicit tag: Tag[A]): (AppConfig) => A
- Definition Classes
- AbstractDIConfigReader
- final def decodeConfig(path: String)(config: DistageConfigImpl)(implicit tag: Tag[A]): A
- Definition Classes
- DIConfigReader → AbstractDIConfigReader
- final def decodeConfig(config: DistageConfigImpl): Try[A]
- Definition Classes
- DIConfigReader → AbstractDIConfigReader
- final def decodeConfigWithDefault(path: String)(default: => A)(config: DistageConfigImpl)(implicit tag: Tag[A]): A
- Definition Classes
- DIConfigReader → AbstractDIConfigReader
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def flatMap[B](f: (A) => DIConfigReader[B]): DIConfigReader[B]
- Definition Classes
- DIConfigReader → AbstractDIConfigReader
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def map[B](f: (A) => B): DIConfigReader[B]
- Definition Classes
- DIConfigReader → AbstractDIConfigReader
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()