Liking cljdoc? Tell your friends :D

monkey.ci.config

Configuration functionality. This reads the application configuration from various sources, like environment vars or command-line args. The configuration is structured in a hierarchy and optionally some values are converted. Then this configuration is used to add any 'constructor functions', that are then used to create new functions to do some actual work. This allows us to change the behaviour of the application with configuration, but also makes it possible to inject dummy functions for testing purposes.

Configuration functionality.  This reads the application configuration from various
sources, like environment vars or command-line args.  The configuration is structured
in a hierarchy and optionally some values are converted.  Then this configuration is
used to add any 'constructor functions', that are then used to create new functions to
do some actual work.  This allows us to change the behaviour of the application with
configuration, but also makes it possible to inject dummy functions for testing 
purposes.
raw docstring

*global-config-file*clj

source

*home-config-file*clj

source

abs-work-dirclj

(abs-work-dir conf)
source

app-configclj

(app-config env args)

Combines app environment with command-line args into a unified configuration structure. Args have precedence over env vars, which in turn override config loaded from files and default values.

Combines app environment with command-line args into a unified 
configuration structure.  Args have precedence over env vars,
which in turn override config loaded from files and default values.
sourceraw docstring

default-app-configclj

Default configuration for the application, without env vars or args applied.

Default configuration for the application, without env vars or args applied.
sourceraw docstring

env-prefixclj

source

group-and-merge-from-envclj

(group-and-merge-from-env m prefix)

Given a map, takes all keys in :env that start with the given prefix (using group-keys) and merges them with the existing submap with same key. For example, {:env {:test-key "value"} :test {:other-key "other-value"}} would become {:test {:key "value" :other-key "other-value"}}.
The newly grouped values overwrite any existing values.

Given a map, takes all keys in `:env` that start with the given prefix 
(using `group-keys`) and merges them with the existing submap with same 
key.
For example, `{:env {:test-key "value"} :test {:other-key "other-value"}}` 
would become `{:test {:key "value" :other-key "other-value"}}`.  
The newly grouped values overwrite any existing values.
sourceraw docstring

group-keysclj

(group-keys m prefix)

Takes all keys in given map m that start with :prefix- and moves them to a submap with the prefix name, and the prefix stripped from the keys. E.g. {:test-key 100} with prefix :test would become {:test {:key 100}}

Takes all keys in given map `m` that start with `:prefix-` and
moves them to a submap with the prefix name, and the prefix 
stripped from the keys.  E.g. `{:test-key 100}` with prefix `:test`
would become `{:test {:key 100}}`
sourceraw docstring

keywordize-typeclj

(keywordize-type v)
source

load-config-fileclj

(load-config-file f)

Loads configuration from given file. This supports json and edn and converts keys always to kebab-case.

Loads configuration from given file.  This supports json and edn and converts
keys always to kebab-case.
sourceraw docstring

load-raw-configclj

(load-raw-config extra-files)

Loads raw (not normalized) configuration from its various sources

Loads raw (not normalized) configuration from its various sources
sourceraw docstring

normalize-configclj

(normalize-config conf env args)

Given a configuration map loaded from file, environment variables and command-line args, applies all registered normalizers to it and returns the result. Since the order of normalizers is undefined, they should not be dependent on each other.

Given a configuration map loaded from file, environment variables and command-line
args, applies all registered normalizers to it and returns the result.  Since the 
order of normalizers is undefined, they should not be dependent on each other.
sourceraw docstring

normalize-keycljmultimethod

Normalizes the config as read from files and env, for the specific key. The method receives the entire config, that also holds the env and args and should return the updated config.

Normalizes the config as read from files and env, for the specific key.
The method receives the entire config, that also holds the env and args
and should return the updated config.
sourceraw docstring

normalize-typedclj

(normalize-typed k conf f)

Convenience function that converts the :type of an entry into a keyword and then invokes f on it.

Convenience function that converts the `:type` of an entry into a keyword and
then invokes `f` on it.
sourceraw docstring

strip-env-prefixclj

(strip-env-prefix e)
source

versioncljmacro

(version)
source

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

× close