lnd/lncfg
Conner Fromknecht 5c8ba59790
lncfg/interface: define Validator iface + variadic Validate
This commit introduces the Validator interface, which
is intended to be implemented by any sub configs. It
specifies a Validate() error method that should fail
if a sub configuration contains any invalid or insane
parameters.

In addition, a package-level Validate method can be
used to check a variadic number of sub configs
implementing the Validator interface. This allows the
primary config struct to be extended via targeted
and/or specialized sub configs, and validate all of
them in sequence without bloating the main package
with the actual validation logic.
2019-04-01 16:33:50 -07:00
..
address_test.go lncfg/address_test: test LNAddress parsing, refactor addr tests 2019-01-09 16:37:56 -08:00
address.go lncfg/address: add LN address parsing 2019-01-09 16:37:48 -08:00
interface.go lncfg/interface: define Validator iface + variadic Validate 2019-04-01 16:33:50 -07:00
workers_test.go config: add sanity check to prevent non-negative worker counts 2019-03-13 20:32:52 -07:00
workers.go lncfg/interface: define Validator iface + variadic Validate 2019-04-01 16:33:50 -07:00