Elektra: Plugin: boolean

Elektra 0.8.24

Plugin: boolean

- infos = Information about the boolean plugin is in keys below
- infos/author = Thomas Waser thoma.nosp@m.s.wa.nosp@m.ser@l.nosp@m.ibel.nosp@m.ektra.nosp@m..org
- infos/licence = BSD
- infos/needs =
- infos/provides = check
- infos/recommends =
- infos/placements = postgetstorage presetstorage
- infos/status = recommended productive maintained reviewed conformant compatible coverage specific unittest tested nodep configurable
- infos/metadata =
- infos/description = canonicalizes boolean values

Different configurations might use different values for `TRUE`/`FALSE`. The `boolean` plugin canonicalizes boolean values.

## Example

# Mount plugin
sudo kdb mount config.ecf user/tests/boolean dump boolean
# By default the plugin uses `1` (true) and `0` (false) to represent boolean values
kdb set user/tests/boolean/truthiness false
kdb setmeta user/tests/boolean/truthiness type boolean
kdb get user/tests/boolean/truthiness
#> 0
# The plugin does not change ordinary values
kdb set user/tests/boolean/key value
kdb get user/tests/boolean/key
#> value
# Undo changes
kdb rm -r user/tests/boolean
sudo kdb umount user/tests/boolean

## Configuration

- `on/true` specifies the normalized value for `TRUE`. Default: `1`
- `on/false` specifies the normalized value for `FALSE`. Default: `0`
- `on/invalid` specifies the normalized value for keys that don't contain a valid boolean value. Values: `TRUE`, `FALSE`. Default: `TRUE`.
- `on/invalid/warning` specifies if the plugin will yield a warning when a invalid value is found during kdbGet. Values: `TRUE`, `FALSE`. Default: `TRUE`
- `true` specifies a (case insensitive) list of valid `TRUE`-values. The values have to be separated by a `;`. Default: `TRUE; 1; ON; ENABLE; ENABLED; YES`
- `false` specifies a (case insensitive) list of valid `FALSE`-values. The values have to be separated by a `;`. Default: `FALSE; 0; OFF; DISABLE; DISABLED; NO; NOT`