Liking cljdoc? Tell your friends :D

wrench.core


configclj

(config)

Provides map with all defined configs and their loaded values

Provides map with all defined configs and their loaded values
sourceraw docstring

defcljmacro

(def var-symbol & [raw-definition])

Defines a config to read from environment variable and validate with a spec Definition map could could have:

  • doc if provided, will be var's docstring
  • spec spec to validate the value (default: string?)
  • name name of the environment variable to read (default: uppercased var name)
  • require to tell that validation should fail if value is missing (default: false)
  • default to provide a fallback value (default: nil)
  • secret if true, value will be replaced with <SECRET> while printing (default: false)
Defines a config to read from environment variable and validate with a spec
Definition map could could have:
- `doc` if provided, will be var's docstring
- `spec` spec to validate the value (default: string?)
- `name` name of the environment variable to read (default: uppercased var name)
- `require` to tell that validation should fail if value is missing (default: false)
- `default` to provide a fallback value (default: nil)
- `secret` if true, value will be replaced with <SECRET> while printing (default: false)
sourceraw docstring

evaluate-cfgclj

(evaluate-cfg cfg-var definition)
source

find-all-varsclj

(find-all-vars)

Collects all defined configurations, based on attached meta

Collects all defined configurations, based on attached meta
sourceraw docstring

from-fileclj

(from-file f)
source

reloadclj

(reload var-symbol)
source

reset!clj

(reset! & {:keys [var env]})

Fakes value of configs for repl-driven development

  • :var accepts map of existing vars that should be replaced
  • :env accepts map with that simulates extra environment variables passed
Fakes value of configs for repl-driven development
- :var accepts map of existing vars that should be replaced
- :env accepts map with that simulates extra environment variables passed
sourceraw docstring

system-envclj

source

validate-and-printclj

(validate-and-print)

Validates that all defined configurations mathces their requirements and returns. Returns false if at least one definition is missing or does not confogrm to the spec. Either prints loaded configuration or list of errors.

Validates that all defined configurations mathces their requirements and returns.
Returns false if at least one definition is missing or does not confogrm to the spec.
Either prints loaded configuration or list of errors.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close