(bind bindings & body)
Evaluates body in a lexical scope in which the symbols in the binding-forms are bound to their corresponding configuration values.
Example: (bind [addr [:tcp :address] port [:tcp :port]] (format "%s:%d" addr port))
Use metadata to assign default values, make configuration keys mandatory or validate them with the Spec library.
Example: (bind [^:required addr [:tcp :address] ^{:default 80 :conform pos?} port [:tcp :port] (format "%s:%d" addr port))
Throws an ExceptionInfo if a required key is missing or a value doesn't conform a spec. The additional data of the exception contains path and value of the affected key.
Evaluates body in a lexical scope in which the symbols in the binding-forms are bound to their corresponding configuration values. Example: (bind [addr [:tcp :address] port [:tcp :port]] (format "%s:%d" addr port)) Use metadata to assign default values, make configuration keys mandatory or validate them with the Spec library. Example: (bind [^:required addr [:tcp :address] ^{:default 80 :conform pos?} port [:tcp :port] (format "%s:%d" addr port)) Throws an ExceptionInfo if a required key is missing or a value doesn't conform a spec. The additional data of the exception contains path and value of the affected key.
(gulp)
Reads the entire edn formatted configuration file.
The default relative path of the configuration file is "config.edn". It gets overwritten by the CONFICK_PATH environment variable or Java system property.
Set CONFICK_CACHE_MILLIS to zero to disable caching.
Reads the entire edn formatted configuration file. The default relative path of the configuration file is "config.edn". It gets overwritten by the CONFICK_PATH environment variable or Java system property. Set CONFICK_CACHE_MILLIS to zero to disable caching.
(lookup ks & {:keys [required default conform] :or {conform any?}})
Searches for a configuration value, where ks is a sequence of keys.
Throws an ExceptionInfo if a required key is missing or a value doesn't conform a spec. The additional data of the exception contains path and value of the affected key.
Searches for a configuration value, where ks is a sequence of keys. Throws an ExceptionInfo if a required key is missing or a value doesn't conform a spec. The additional data of the exception contains path and value of the affected key.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close