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


*home-config-file*clj


abs-work-dirclj

(abs-work-dir conf)

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.
raw docstring

config->envclj

(config->env c)

Creates a map of env vars from the config. This is done by flattening the entries and prepending them with monkeyci-. Values are converted to string.

Creates a map of env vars from the config.  This is done by flattening
the entries and prepending them with `monkeyci-`.  Values are converted 
to string.
raw 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.
raw docstring

env-prefixclj


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.
raw 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}}`
raw docstring

keywordize-typeclj

(keywordize-type v)

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.
raw 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
raw 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.
raw 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.
raw 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.
raw docstring

serialize-configcljmultimethod


strip-env-prefixclj

(strip-env-prefix e)

versioncljmacro

(version)

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

× close