Elektra  0.8.23
Plugin: simplespeclang

See the validation tutorial for introduction. This plugin provides a conceptual simplistic specification language.

It currently supports to specify:

Purpose

The plugin demonstrates how simple a configuration specification can be within the Elektra framework. It is conceptual and mainly for educational usage. You can base your plugins

Configuration

Configuration within the specification language:

Usage

First you need to mount the plugin to spec, e.g.:

sudo kdb mount myspec.ssl spec/test simplespeclang

Then you can write your specification (with default keywords):

cat > `kdb file spec/test` << HERE
mountpoint filename.txt
enum key = value1 value2 value3
enum key2 = value1 value2
HERE

And finally you need a specification mount, so that all necessary plugins are present:

kdb spec-mount /test

Also make sure that spec is mounted as global plugin:

kdb global-mount

Then you are only able to write valid keys:

kdb set /test/key value1 # accepted
kdb set /test/key2 value3 # rejected, no value3 for key2
kdb set /test/something else # rejected, no key something