Liking cljdoc? Tell your friends :D

montoux.gestalt

Gestalt is a small library that does one thing: it moves configuration parameters such as database connection parameters or SSL keystore locations out of your Clojure code and into a configuration file that lives outside your source tree.

Gestalt is a small library that does one thing: it moves configuration parameters such as database connection parameters or SSL keystore locations out of your Clojure code and into a configuration file that lives outside your source tree.
raw docstring

DEFAULT_CONFIG_FILEclj

The default config file. Can be overridden by setting the java property gestalt.file, or by calling reset-gestalt! with the appropriate filename

The default config file. Can be overridden by setting the java property
`gestalt.file`, or by calling `reset-gestalt!` with the appropriate filename
sourceraw docstring

DEFAULT_ENVIRONMENTclj

The default environment to use. Defaults to "development". This value and the value of java property gestalt.environment are specified as strings, but in the configuration file your environment keys should be keywords, e.g. :development.

The default environment to use. Defaults to "development". This value
and the value of java property `gestalt.environment` are specified as strings, but
in the configuration file your environment keys should be keywords, e.g. `:development`.
sourceraw docstring

defined?clj

(defined? k)

Returns true if and only if key k is defined in the configuration map.

Returns true if and only if key k is defined in the configuration map.
sourceraw docstring

environmentclj

(environment)

Returns the environment the application is running in.

Returns the environment the application is running in.
sourceraw docstring

GESTALT_CONFIG_FILE_PROPclj

Name of the Java property to specify another config file

Name of the Java property to specify another config file
sourceraw docstring

GESTALT_ENVIRONMENT_PROPclj

Name of Java property that determines the environment

Name of Java property that determines the environment
sourceraw docstring

getclj

(get & ks)

Returns the configuration value for keys ks.

Returns the configuration value for keys ks.
sourceraw docstring

reset-gestalt!clj

(reset-gestalt!)
(reset-gestalt! file-or-reader)
(reset-gestalt! file-or-reader env)

Initialises the configuration system. NB: this is called automatically when you first use call get or environment, but you could call this function to specify a custom location of the configuration file, or a custom environment. When reset-gestalt! is called in the body of a with-scoped-config call, the reset is only visible within body.

Initialises the configuration system.
NB: this is called automatically when you first use call `get` or
`environment`, but you could call this function to specify a custom
location of the configuration file, or a custom environment.
When `reset-gestalt!` is called in the body of a `with-scoped-config`
call, the reset is only visible within body.
sourceraw docstring

with-configcljmacro

(with-config cfg & body)

Temporarily sets the configuration to cfg and evaluates body

Temporarily sets the configuration to cfg and evaluates body
sourceraw docstring

with-environmentcljmacro

(with-environment env & body)

Temporarily sets the environment to env and evaluates body.

Temporarily sets the environment to env and evaluates body.
sourceraw docstring

with-scoped-configcljmacro

(with-scoped-config & body)

Creates a thread-bound scope for configuration and environment and evaluates body. This will cause calls to reset-gestalt! to only affect the config and environment in the scope of body; useful for testing.

Creates a thread-bound scope for configuration and environment and
evaluates body. This will cause calls to `reset-gestalt!` to only
affect the config and environment in the scope of body; useful for
testing.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close