Liking cljdoc? Tell your friends :D

active.clojure.config

Application configuration via a big map.

A configuration is a nested key-value map.

It contains top-level settings and sections of qualified settings, like so:

{:top-level-setting-key 'foo
 {:section-key
  {:section-setting 'bar}}}

Additionally, a config contains profiles with additional settings that can be mixed in, like so:

{:top-level-setting-key 'foo
 {:section-key
  {:section-setting 'bar}}
 {:profiles
  {:dev
   {:top-level-setting-key 'bar
    {:section-key
     {:section-setting 'baz}}}}}}

Each profile has the same format as the top-level configuration itself (sans the :profiles key).

Application configuration via a big map.

A configuration is a nested key-value map.

It contains top-level settings and sections of qualified settings, like so:


    {:top-level-setting-key 'foo
     {:section-key
      {:section-setting 'bar}}}

Additionally, a config contains *profiles* with additional
settings that can be mixed in, like so:

    {:top-level-setting-key 'foo
     {:section-key
      {:section-setting 'bar}}
     {:profiles
      {:dev
       {:top-level-setting-key 'bar
        {:section-key
         {:section-setting 'baz}}}}}}

Each profile has the same format as the top-level configuration itself
  (sans the `:profiles` key).
raw docstring

accessclj/s

(access config setting-or-section & sections)

Access the value of a setting or map of a section.

Note that the setting comes first, followed by the access path.

Access the value of a setting or map of a section.

Note that the setting comes first, followed by the access path.
sourceraw docstring

any-rangeclj/s

(any-range & rs)

Range that satisfies one of the ranges, tried from left to right.

Range that satisfies one of the ranges, tried from left to right.
sourceraw docstring

any-value-rangeclj/s

(any-value-range dflt)

Range for any value at all.

Range for any value at all.
sourceraw docstring

boolean-rangeclj/s

(boolean-range dflt)

Range for a boolean, with explicit default.

Range for a boolean, with explicit default.
sourceraw docstring

boolean?clj/s

(boolean? x)

Check if a value is a boolean.

Check if a value is a boolean.
sourceraw docstring

check-sectionclj/s

(check-section section val inherited-map path)
source

complete-sectionclj/s

(complete-section inherited-map path section)
source

complete-settingsclj/s

(complete-settings inherited-map settings-map)
source

Configurationcljs

Validated and expanded configuration object.

Validated and expanded configuration object.
sourceraw docstring

configuration-objectclj/s

(configuration-object Configuration)

Access object field from a Configuration record. See active.clojure.config/really-make-configuration.

Access `object` field from a [[Configuration]] record. See [[active.clojure.config/really-make-configuration]].
sourceraw docstring

configuration-schemaclj/s

(configuration-schema Configuration)

Access schema field from a Configuration record. See active.clojure.config/really-make-configuration.

Access `schema` field from a [[Configuration]] record. See [[active.clojure.config/really-make-configuration]].
sourceraw docstring

configuration?clj/s

(configuration? thing)

Is object a Configuration record? See active.clojure.config/really-make-configuration.

Is object a `Configuration` record? See [[active.clojure.config/really-make-configuration]].
sourceraw docstring

default-string-rangeclj/s

(default-string-range dflt)
source

diff-configuration-objectsclj/s

(diff-configuration-objects schema config-object-1 config-object-2)

Returns sequence of triples [path-vector version-1 version-2] of settings that differ.

The config objects must be validated and completed.

Returns sequence of triples `[path-vector version-1 version-2]` of settings that differ.

The config objects must be validated and completed.
sourceraw docstring

diff-configurationsclj/s

(diff-configurations schema config-1 config-2)

Returns sequence of triples [path-vectors version-1 version-2] of settings that differ.

Returns sequence of triples [path-vectors version-1 version-2] of settings that differ.
sourceraw docstring

integer-between-rangeclj/s

(integer-between-range min max dflt)

Range for an integer from a specified range, with explicit default.

Range for an integer from a specified range, with explicit default.
sourceraw docstring

keyword-rangeclj/s

source

make-configurationclj/s

(make-configuration schema profile-names config-object)

Make a configuration from a map.

Make a configuration from a map.
sourceraw docstring

make-map-schemaclj/s

(make-map-schema description settings settings-map sections sections-map)

Make a Schema object describing a config format. For internal use; you should use schema.

  • description is a human-readable description
  • settings is a collection of Settings
  • settings-map is a map from setting keys to settings
  • sections is a collection of Sections
  • sections-map is a map from section keys to sections
Make a [[Schema]] object describing a config format.
*For internal use;* you should use [[schema]].

- `description` is a human-readable description
- `settings` is a collection of [[Setting]]s
- `settings-map` is a map from setting keys to settings
- `sections` is a collection of [[Section]]s
- `sections-map` is a map from section keys to sections
sourceraw docstring

make-rangeclj/s

(make-range description completer reduce)

Make a [[Range]] range object.

  • `description' is a human-readable string
  • `completer' is a function that accepts a range, a key, and a value, and either returns a "completed" value that takes defaults etc. into account, or a RangeError object.
  • reduce is a function accepting a range, a key, a function, an initial result, and a value, reducing collection values similar to clojure [[reduce]], calling (f range key res v) on all scalar values.
Make a [[Range]] range object.
- `description' is a human-readable string
- `completer' is a function that accepts a range, a key, and a value,
   and either returns a "completed" value that takes defaults etc. into account,
   or a [[RangeError]] object.
- `reduce` is a function accepting a range, a key, a function, an initial result,
   and a value, reducing collection values similar to clojure [[reduce]], calling
   `(f range key res v)` on all scalar values.
sourceraw docstring

make-range-errorclj/s

(make-range-error range path value)

Make a a RangeError object describing an error from range checking.

  • range is the range that caused the error
  • path is the path in the configuration that describes where the error is.
  • value is the value that was wrong.

range can be nil' ifkey` does not appear in the schema.

Make a a [[RangeError]] object describing an error from range checking.
- `range` is the range that caused the error
- `path` is the path in the configuration that describes where the error is.
- `value` is the value that was wrong.

`range` can be `nil' if `key` does not appear in the schema.
sourceraw docstring

make-scalar-rangeclj/s

(make-scalar-range description completer)

Make a range for unstructured, non-collection ranges.

Make a range for unstructured, non-collection ranges.
sourceraw docstring

make-sectionclj/s

(make-section key schema inherit?)

Construct a Section (Section within a config with settings of its own.) record.

key: access via active.clojure.config/section-key schema: access via active.clojure.config/section-schema inherit?: access via active.clojure.config/section-inherit?

Construct a `Section` (Section within a config with settings of its own.) record.

`key`: access via [[active.clojure.config/section-key]]
`schema`: access via [[active.clojure.config/section-schema]]
`inherit?`: access via [[active.clojure.config/section-inherit?]]
sourceraw docstring

make-sequence-schemaclj/s

(make-sequence-schema description element-schema)

Construct a SequenceSchema (A sequence schema describes a sequence config format.) record.

description: access via active.clojure.config/sequence-schema-description element-schema: access via active.clojure.config/sequence-schema-element-schema

Construct a `SequenceSchema` (A sequence schema describes a sequence config format.) record.

`description`: access via [[active.clojure.config/sequence-schema-description]]
`element-schema`: access via [[active.clojure.config/sequence-schema-element-schema]]
sourceraw docstring

make-settingclj/s

(make-setting key description range inherit?)

Make a named schema Setting object.

  • key is a keyword naming the setting
  • description is a human-readable description object
  • range is a [[Range]] for the admissible values of the setting
  • inherit? says whether the setting values may be inherited from a surrounding section
Make a named schema [[Setting]] object.
- `key` is a keyword naming the setting
- `description` is a human-readable description object
- `range` is a [[Range]] for the admissible values of the setting
- `inherit?` says whether the setting values may be inherited from a surrounding section
sourceraw docstring

map-of-rangeclj/s

(map-of-range key-range val-range)

Range for a map with keys and values of underlying ranges, respectively.

Range for a map with keys and values of underlying ranges, respectively.
sourceraw docstring

map-schema-descriptionclj/s

(map-schema-description Schema)

Access description field from a Schema record. See active.clojure.config/make-map-schema.

Access `description` field from a [[Schema]] record. See [[active.clojure.config/make-map-schema]].
sourceraw docstring

map-schema-sectionsclj/s

(map-schema-sections Schema)

Access sections field from a Schema record. See active.clojure.config/make-map-schema.

Access `sections` field from a [[Schema]] record. See [[active.clojure.config/make-map-schema]].
sourceraw docstring

map-schema-sections-mapclj/s

(map-schema-sections-map Schema)

Access sections-map field from a Schema record. See active.clojure.config/make-map-schema.

Access `sections-map` field from a [[Schema]] record. See [[active.clojure.config/make-map-schema]].
sourceraw docstring

map-schema-settingsclj/s

(map-schema-settings Schema)

Access settings field from a Schema record. See active.clojure.config/make-map-schema.

Access `settings` field from a [[Schema]] record. See [[active.clojure.config/make-map-schema]].
sourceraw docstring

map-schema-settings-mapclj/s

(map-schema-settings-map Schema)

Access settings-map field from a Schema record. See active.clojure.config/make-map-schema.

Access `settings-map` field from a [[Schema]] record. See [[active.clojure.config/make-map-schema]].
sourceraw docstring

map-schema?clj/s

(map-schema? thing)

Is object a Schema record? See active.clojure.config/make-map-schema.

Is object a `Schema` record? See [[active.clojure.config/make-map-schema]].
sourceraw docstring

max-string-rangeclj/s

(max-string-range max-length)
source

merge-config-objectsclj/s

(merge-config-objects schema c)
(merge-config-objects schema c1 c2)
(merge-config-objects schema c1 c2 & cs)

Merge several config maps into one, with the latter taking precedence.

Merge several config maps into one, with the latter taking precedence.
sourceraw docstring

non-nil-rangeclj/s

Range for any non-nil value.

Range for any non-nil value.
sourceraw docstring

nonempty-string-rangeclj/s

(nonempty-string-range & [max-length])

Range for a non-empty string with optional max length.

Range for a non-empty string with optional max length.
sourceraw docstring

normalize&check-config-objectclj/s

(normalize&check-config-object schema profile-names config)
(normalize&check-config-object schema profile-names config inherited-map path)

Normalize and check the validity of a configuration object.

In the result, every setting has an associated value.

Normalize and check the validity of a configuration object.

In  the result, every setting has an associated value.
sourceraw docstring

one-of-rangeclj/s

(one-of-range vals dflt)

Range for one of a set of values, with explicit default.

Range for one of a set of values, with explicit default.
sourceraw docstring

one-of-range-custom-compareclj/s

(one-of-range-custom-compare vals dflt compare-fn)

Range for one of a set of values, with custom compare function, with explicit default.

Range for one of a set of values, with custom compare function,
with explicit default.
sourceraw docstring

optional-default-rangeclj/s

(optional-default-range range dflt)

Range for something that may be in an underlying range. If it is nil, then dflt is used, which must be in the underlying range too.

Range for something that may be in an underlying range. If it is nil, then `dflt` is used, which must be in the underlying range too.
sourceraw docstring

optional-rangeclj/s

(optional-range range)

Range for something that may be in an underlying range or nil.

Range for something that may be in an underlying range or `nil`.
sourceraw docstring

or-dot-rangeclj/s

(or-dot-range r)

Given range r is required in the first line, the remainder of the lines the field holds ".".

Given range `r` is required in the first line,
the remainder of the lines the field holds ".".
sourceraw docstring

predicate-rangeclj/s

(predicate-range desc pred dflt)

Range specified by a simple predicate.

Range specified by a simple predicate.
sourceraw docstring

range-completerclj/s

(range-completer ValueRange)

Access completer field from a ValueRange record. See active.clojure.config/make-range.

Access `completer` field from a [[ValueRange]] record. See [[active.clojure.config/make-range]].
sourceraw docstring

range-descriptionclj/s

(range-description ValueRange)

Access description field from a ValueRange record. See active.clojure.config/make-range.

Access `description` field from a [[ValueRange]] record. See [[active.clojure.config/make-range]].
sourceraw docstring

range-error-pathclj/s

(range-error-path RangeError)

Access path field from a RangeError record. See active.clojure.config/make-range-error.

Access `path` field from a [[RangeError]] record. See [[active.clojure.config/make-range-error]].
sourceraw docstring

range-error-rangeclj/s

(range-error-range RangeError)

Access range field from a RangeError record. See active.clojure.config/make-range-error.

Access `range` field from a [[RangeError]] record. See [[active.clojure.config/make-range-error]].
sourceraw docstring

range-error-valueclj/s

(range-error-value RangeError)

Access value field from a RangeError record. See active.clojure.config/make-range-error.

Access `value` field from a [[RangeError]] record. See [[active.clojure.config/make-range-error]].
sourceraw docstring

range-error?clj/s

(range-error? thing)

Is object a RangeError record? See active.clojure.config/make-range-error.

Is object a `RangeError` record? See [[active.clojure.config/make-range-error]].
sourceraw docstring

range-mapclj/s

(range-map descr range f & args)

Range constructed by transforming values matching an existing range.

Range constructed by transforming values matching an existing range.
sourceraw docstring

range-reduceclj/s

(range-reduce ValueRange)

Access reduce field from a ValueRange record. See active.clojure.config/make-range.

Access `reduce` field from a [[ValueRange]] record. See [[active.clojure.config/make-range]].
sourceraw docstring

range?clj/s

(range? thing)

Is object a ValueRange record? See active.clojure.config/make-range.

Is object a `ValueRange` record? See [[active.clojure.config/make-range]].
sourceraw docstring

RangeErrorcljs

Description of an error that occurred during range checking

Description of an error that occurred during range checking
sourceraw docstring

really-make-configurationclj/s

(really-make-configuration object schema)

Construct a Configuration (Validated and expanded configuration object.) record.

object: access via active.clojure.config/configuration-object schema: access via active.clojure.config/configuration-schema

Construct a `Configuration` (Validated and expanded configuration object.) record.

`object`: access via [[active.clojure.config/configuration-object]]
`schema`: access via [[active.clojure.config/configuration-schema]]
sourceraw docstring

Schemacljs

A schema describes a map-structured config format, and can be used for validation and completion.

A schema describes a map-structured config format, and can be used for
validation and completion.
sourceraw docstring

schemaclj/s

(schema description & element-list)

Construct a map schema.

  • description is a human-readable description
  • `element-list' is a list of the Settings and Sections of the schema
Construct a map schema.

- `description` is a human-readable description
- `element-list' is a list of the [[Setting]]s and [[Section]]s of the schema
sourceraw docstring

schema-rangeclj/s

(schema-range schema)

Range for a configuration object matching a schema.

Range for a configuration object matching a schema.
sourceraw docstring

sectionclj/s

(section key schema & {:keys [inherit?]})

Make a section within a config with settings of its own.

Make a section within a config with settings of its own.
sourceraw docstring

Sectioncljs

Section within a config with settings of its own.

Section within a config with settings of its own.
sourceraw docstring

section-inherit?clj/s

(section-inherit? Section)

Access inherit? field from a Section record. See active.clojure.config/make-section.

Access `inherit?` field from a [[Section]] record. See [[active.clojure.config/make-section]].
sourceraw docstring

section-keyclj/s

(section-key Section)

Access key field from a Section record. See active.clojure.config/make-section.

Access `key` field from a [[Section]] record. See [[active.clojure.config/make-section]].
sourceraw docstring

section-schemaclj/s

(section-schema Section)

Access schema field from a Section record. See active.clojure.config/make-section.

Access `schema` field from a [[Section]] record. See [[active.clojure.config/make-section]].
sourceraw docstring

section-subconfigclj/s

(section-subconfig config & sections)

Extract a section from a config as a config.

Extract a section from a config as a config.
sourceraw docstring

section?clj/s

(section? thing)

Is object a Section record? See active.clojure.config/make-section.

Is object a `Section` record? See [[active.clojure.config/make-section]].
sourceraw docstring

sequable?clj/s

(sequable? thing)

Test if something can be coerced to a seq.

Test if something can be coerced to a seq.
sourceraw docstring

sequence-of-rangeclj/s

(sequence-of-range range)

Range for a sequence of values of an underlying range.

Range for a sequence of values of an underlying range.
sourceraw docstring

sequence-schemaclj/s

(sequence-schema desc el-schema)
source

sequence-schema-descriptionclj/s

(sequence-schema-description SequenceSchema)

Access description field from a SequenceSchema record. See active.clojure.config/make-sequence-schema.

Access `description` field from a [[SequenceSchema]] record. See [[active.clojure.config/make-sequence-schema]].
sourceraw docstring

sequence-schema-element-schemaclj/s

(sequence-schema-element-schema SequenceSchema)

Access element-schema field from a SequenceSchema record. See active.clojure.config/make-sequence-schema.

Access `element-schema` field from a [[SequenceSchema]] record. See [[active.clojure.config/make-sequence-schema]].
sourceraw docstring

sequence-schema?clj/s

(sequence-schema? thing)

Is object a SequenceSchema record? See active.clojure.config/make-sequence-schema.

Is object a `SequenceSchema` record? See [[active.clojure.config/make-sequence-schema]].
sourceraw docstring

SequenceSchemacljs

A sequence schema describes a sequence config format.

A sequence schema describes a sequence config format.
sourceraw docstring

set-of-rangeclj/s

(set-of-range range)

Range for a set of values of an underlying range.

Range for a set of values of an underlying range.
sourceraw docstring

Settingcljs

Named setting within a config.

Named setting within a config.
sourceraw docstring

settingclj/s

(setting key description range & {:keys [inherit?]})

Construct a setting.

  • key is a keyword naming the setting
  • description is a human-readable description object
  • range is a [[Range]] for the admissible values of the setting
  • inherit? says whether the setting values may be inherited from a surrounding section
Construct a setting.
- `key` is a keyword naming the setting
- `description` is a human-readable description object
- `range` is a [[Range]] for the admissible values of the setting
- `inherit?` says whether the setting values may be inherited from a surrounding section
sourceraw docstring

setting-default-valueclj/s

(setting-default-value setting)

Compute the default value for a setting.

Compute the default value for a setting.
sourceraw docstring

setting-descriptionclj/s

(setting-description Setting)

Access description field from a Setting record. See active.clojure.config/make-setting.

Access `description` field from a [[Setting]] record. See [[active.clojure.config/make-setting]].
sourceraw docstring

setting-inherit?clj/s

(setting-inherit? Setting)

Access inherit? field from a Setting record. See active.clojure.config/make-setting.

Access `inherit?` field from a [[Setting]] record. See [[active.clojure.config/make-setting]].
sourceraw docstring

setting-keyclj/s

(setting-key Setting)

Access key field from a Setting record. See active.clojure.config/make-setting.

Access `key` field from a [[Setting]] record. See [[active.clojure.config/make-setting]].
sourceraw docstring

setting-rangeclj/s

(setting-range Setting)

Access range field from a Setting record. See active.clojure.config/make-setting.

Access `range` field from a [[Setting]] record. See [[active.clojure.config/make-setting]].
sourceraw docstring

setting?clj/s

(setting? thing)

Is object a Setting record? See active.clojure.config/make-setting.

Is object a `Setting` record? See [[active.clojure.config/make-setting]].
sourceraw docstring

slurpable-rangeclj

Range for something that may be passed to [[slurp]].

Range for something that may be passed to [[slurp]].
sourceraw docstring

string-rangeclj/s

Range for an abitrary string, default is empty string.

Range for an abitrary string, default is empty string.
sourceraw docstring

tuple-of-rangeclj/s

(tuple-of-range & rs)

Range for a sequence of mixed underlying ranges.

Range for a sequence of mixed underlying ranges.
sourceraw docstring

ValueRangecljs

Description of a range of values.

Description of a range of values.
sourceraw docstring

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

× close