This PR adds structured logging for the aggregator service. Currently, only the text handler is used, but I can extend this to use the JSON handler as well. In this case, probably some code that is shared between the aggregator and the downloader would need to be moved to a common package.
I was also wondering, whether this repo is moving to Go 1.21 at the future, since `slog` was introduced in to the standard lib in 1.21. So currently, this still relies on the `x/exp` package.
Fixes #462
* Convert a lot of variables to snake case
* Add snakecase for variables made out of two words that had it in no version yet (for consistency)
* Adjust example files too
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
* move csaf_searcher to a lower prio place
* Adjust wording
* Grammar fix #2 'this is work in progress' -> 'This is a work in progress'...
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
* use full name for printing out the used logfile for the downloader.
* for debug or verbose, log the timeintervall that will be used
for downloader and aggregator. (The checker has this as part
of its output already.)
* Simplify forward method
* Add unit test for validation status
* Add unit test for stats logging in forwarder.
* Add unit test for http client creation.
* Add unit test for replaceExt
* Add unit test for buildRequest
* Add unit test for limitedString
* Add unit test for storeFailedAdvisory
* Add unit test for storeFailedAdvisory ... fixed
* Add unit test for storeFailed
* Add unit test for forward
* comment wording
* Remove verbose flag from downloader.
* Do structured http logging in forwarder, too.
* Use structured logging to separate http traffic of downloader from forwarder.
* add forwarding support in downloader
* Raise needed Go version to 1.21+ so slog can be used.
* Introduce validation mode flag (strict, unsafe)
* Add structured logging and place log into the download folder.
* Improve some code comment (bernhardreiter)
* Add counting stats to downloader.
* started with forwarding support in downloader
* Add missing files.
* Add missing files.
* Raise needed Go version
* More Go version bumping.
* Fix forwarding
* Go 1.21+ needed
* Make terminating forwarder more robust.
* Better var naming
* Remove dead code. Improve commentary.
* Prepare validation status adjustment.
* Move validations to functions to make them executable in a loop.
* Introduce validation mode flag (strict, unsafe)
* Make uploader use the TOML config file intrastructure, too.
* Improve method naming a bit.
* Improve method naming a bit.
* Add forgotten struct tags for TOML
* Add version to command line only parameters in uploader documentation
* Be explicit about supported options in config file.
* allow interactive flags in config file.
---------
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
* Changed infos to warnings and errors for Requirements 11-17 if said Requirements were not checked.
* Made a few more infos to warnings, slightly improved some messages in the reporters.
* Add explicite errors if badROLIEFeed and badFolders were not used.
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
* Label the option experimental and limited at all places.
* Point to the downloader documentation as single point to write more.
* Add more hints on how the old PEM block encryption is experimental
and why it often shall not be used.
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>