Packages

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
AbstractDIConfigReader[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DIConfigReader
  2. AbstractDIConfigReader
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def decodeConfigValue(configValue: ConfigValue): Try[A]
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def decodeAppConfig(path: String)(implicit tag: Tag[A]): (AppConfig) => A
    Definition Classes
    AbstractDIConfigReader
  7. final def decodeAppConfigWithDefault(path: String)(default: => A)(implicit tag: Tag[A]): (AppConfig) => A
    Definition Classes
    AbstractDIConfigReader
  8. final def decodeConfig(path: String)(config: DistageConfigImpl)(implicit tag: Tag[A]): A
  9. final def decodeConfig(config: DistageConfigImpl): Try[A]
  10. final def decodeConfigWithDefault(path: String)(default: => A)(config: DistageConfigImpl)(implicit tag: Tag[A]): A
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def flatMap[B](f: (A) => DIConfigReader[B]): DIConfigReader[B]
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def map[B](f: (A) => B): DIConfigReader[B]
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AbstractDIConfigReader[A]

Inherited from AnyRef

Inherited from Any

Ungrouped