Object

zio.config.typesafe

TypesafeConfigSource

Related Doc: package typesafe

Permalink

object TypesafeConfigSource

Annotations
@silent( "Unused import" )
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TypesafeConfigSource
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def fromHoconFile[A](file: File): config.ConfigSource

    Permalink

    Retrieve a ConfigSource from typesafe-config from a given config file

    Retrieve a ConfigSource from typesafe-config from a given config file

    A complete example usage:

    val configSource = TypesafeConfigSource.fromHoconFile(new File("/path/to/xyz.hocon"))
    
    case class MyConfig(port: Int, url: String)
    
    val result: Task[MyConfig] =
      configSource.flatMap(source => ZIO.fromEither(read(descriptor[MyConfig] from source))
  10. def fromHoconFilePath[A](filePath: String): config.ConfigSource

    Permalink

    Retrieve a ConfigSource from typesafe-config from a path to a config file

    Retrieve a ConfigSource from typesafe-config from a path to a config file

    A complete example usage:

    val configSource =
      TypesafeConfigSource.fromHoconFilePath("/path/to/xyz.hocon")
    
    case class MyConfig(port: Int, url: String)
    
    val result: Task[MyConfig] =
      read(descriptor[MyConfig] from configSource)
  11. def fromHoconString(input: String): config.ConfigSource

    Permalink

    Retrieve a ConfigSource from typesafe-config HOCON string.

    Retrieve a ConfigSource from typesafe-config HOCON string.

    A complete example usage:

    val hocon =
      s"""
        {
           port : 8080
           url  : abc.com
        }
    
      """
    val configSource = TypesafeConfigSource.fromHoconString(hocon)
    
    case class MyConfig(port: Int, url: String)
    
    val result: Either[ReadError[String], MyConfig] =
      configSource.flatMap(source => read(descriptor[MyConfig] from source)))
  12. def fromResourcePath: config.ConfigSource

    Permalink

    Retrieve a ConfigSource from typesafe-config from a given file in resource classpath.

    Retrieve a ConfigSource from typesafe-config from a given file in resource classpath.

    A complete example usage:

    case class MyConfig(port: Int, url: String)
    
    val result: IO[ReadError[String], MyConfig] =
      read(descriptor[MyConfig] from TypesafeConfigSource.fromResourcePath))
  13. def fromTypesafeConfig(rawConfig: ZIO[Any, Throwable, com.typesafe.config.Config]): config.ConfigSource

    Permalink

    Retrieve a ConfigSource from typesafe-config data type.

    Retrieve a ConfigSource from typesafe-config data type.

    A complete example usage:

    val hocon =
      s"""
        {
           port : 8080
           url  : abc.com
        }
    
      """
    val configSource = TypesafeConfigSource.fromTypesafeConfig(ZIO.attempt(ConfigFactory.load.resolve))
    
    case class MyConfig(port: Int, url: String)
    
    val result: Either[ReadError[String], MyConfig] =
      configSource.flatMap(source => read(descriptor[MyConfig] from source)))

    We are ending up calling memoize (without leaving it to the user) is some of th limitations in typesafe/config project such as:

    https://github.com/lightbend/config/issues/30 (open as of 29/12/2021)

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def partitionWith[K, V, A](trees: List[PropertyTree[K, V]])(pf: PartialFunction[PropertyTree[K, V], A]): List[A]

    Permalink
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped