UCG, aka Universal Configuration Grammar, is a data notation created in 2017 by Jeremy Wall.
#1440on PLDB | 7Years Old |
git clone https://github.com/zaphar/ucg
UCG is a universal grammar for configuration. UCG's goal is not to define a configuration format like JSON, YAML, or TOML. It is not intended to replace the other serialization formats. Instead it is intended to provide a common grammar for generating those formats.
let db_confs = import "db/mysql/hosts.ucg";
let consul_hosts = import "services/consul/hosts.ucg".host_pool;
let conf = {
port = 8888,
addr = "0.0.0.0",
db = {
host = db_confs.host_pool.addr,
port = db_confs.host_pool.port,
database = "myservicedb",
},
config_svc = consul_hosts.url,
};
out json conf;