(config)
Provides map with all defined configs and their loaded values
Provides map with all defined configs and their loaded values
(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 docstringspec
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)
(find-all-vars)
Collects all defined configurations, based on attached meta
Collects all defined configurations, based on attached meta
(reset! & {:keys [var env]})
Fakes value of configs for repl-driven development
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
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close