Commit Graph

5 Commits

Author SHA1 Message Date
Vincent Bernat
2ba10b0195 common/helpers: add more pretty formatter for SubnetMap
This is annoying to have to do that for each of them...
2023-09-05 23:06:08 +02:00
Vincent Bernat
c6a9319b57 common/schema: turns into a component
This is a first step to make it accept configuration. Most of the
changes are quite trivial, but I also ran into some difficulties with
query columns and filters. They need the schema for parsing, but parsing
happens before dependencies are instantiated (and even if it was not the
case, parsing is stateless). Therefore, I have added a `Validate()`
method that must be called after instantiation. Various bits `panic()`
if not validated to ensure we catch all cases.

The alternative to make the component manages a global state would have
been simpler but it would break once we add the ability to add or
disable columns.
2023-01-18 12:22:10 +01:00
Vincent Bernat
ae69bcb70f common/helpers: fix Diff configuration 2022-09-09 22:49:52 +02:00
Vincent Bernat
9a3258719a common/helpers: remove global side-effect from DiffFormatter option 2022-09-09 13:58:25 +02:00
Vincent Bernat
1587c5ff44 common/helpers: move some test functions to separate files 2022-09-09 11:22:35 +02:00