As one of the steps to simplifies the codebase, the AncestryWithContent
struct is renamed to Ancestry, and Ancestry is removed. It will cause
the PostAncestry request to be slower.
This change pulls as much pagination logic out of the database
implementation as possible. Database implementations should now be able
to marshal whatever state they need into opaque tokens with the
utilities in the pagination package.
This puts config in its relevant location and moves functions around
loading config files into the main package.
As a side effect of removing cyclic imports for the API config, the
context library is no longer used.
This removes the `types` package instead moving the contents to the
top-level clair package.
This change also renames the `Priority` type to `Severity` in order to
reduce confusion.
This change also removes the IsValid method and replaces it with a safe
constructor to avoid the creation of invalid values.
Many docstrings were tweaked in the making of this commit.
There is apparently no reason to ignore empty results - it was probably the case in the past (`null` value).
["", "v"] should be considered invalid by toValue() because it represents two values.
["", "v"] should be returned as it by toValues(), not trimming "".
Tests passes, it will hopefully not cause any issue in prod.
Clair will now use a YAML configuration file instead of command line
arguments as the number of parameters grows.
Also, Clair now exposes a Boot() func that allows everyone to easily
create their own project and load dynamically their own fetchers/updaters.