Packages

trait DIConfigReader[A] extends AnyRef

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

Abstract Value Members

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

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() @HotSpotIntrinsicCandidate()
  6. final def decodeAppConfig(path: String)(implicit tag: Tag[A]): (AppConfig) => A
  7. final def decodeAppConfigWithDefault(path: String)(default: => A)(implicit tag: Tag[A]): (AppConfig) => A
  8. final def decodeConfig(path: String)(config: Config)(implicit tag: Tag[A]): A
  9. final def decodeConfigWithDefault(path: String)(default: => A)(config: Config)(implicit tag: Tag[A]): A
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def flatMap[B](f: (A) => DIConfigReader[B]): DIConfigReader[B]
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def map[B](f: (A) => B): DIConfigReader[B]
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped