Kuddle.Config.DirectoryProvider (Kuddle Config v0.1.0) View Source

Use Kuddle as a config provider for a directory, if you want to load a single file see Kuddle.Config.Provider instead

Example

defp releases do
  [
    application: [
      config_providers: [
        {Kuddle.Config.Provider, [
          paths: [
            {:system, "PATH_TO_CONFIG", "/default/path/to/kdl/config"}
          ],
          extensions: [".kdl", ".kuddle"]
        ]}
      ]
    ]
  ]
end

Link to this section Summary

Types

Specify a list of extensions that should be treated as kdl files.

Options supported by the DirectoryProvider

The directory provider allows specifying multiple paths to get config files from, this path will be joined with the wildcard */ and postfixed with the extensions.

Link to this section Types

Specs

extensions_option() :: {:extensions, [String.t()]}

Specify a list of extensions that should be treated as kdl files.

Default: [".kdl"]

Example:

[
  extensions: [".kdl", ".kuddle"]
]

Specs

option() :: paths_option() | extensions_option()

Specs

options() :: [option()]

Options supported by the DirectoryProvider

Example:

[
  paths: [
    "/etc/my_application/config"
  ],
  extensions: [".cfg.kdl", ".cfg.kuddle"]
]

Specs

paths_option() :: {:paths, [Config.Provider.config_path()]}

The directory provider allows specifying multiple paths to get config files from, this path will be joined with the wildcard */ and postfixed with the extensions.

Example:

[
  paths: [
    "/etc/my_application/config"
  ]
]