mirror of
https://github.com/falcosecurity/falco.git
synced 2026-03-19 19:22:05 +00:00
Define a falco_load_result abstract class for use in new load_rules methods. It's abstract so the implementation details in rule_loader/rule_reader can be hidden from someone who wants to use the API to load rules and work with a result. The class defines a set of error codes/warning codes and has static methods to get a short and long description of each error/warning. There are virtual methods to access the important parts of a result: - successful or not - a string representation of the result, suitable for display to users. Takes a verbose argument. When verbose is true, the string is multi-line and has full details, including locations, item names, etc. When verbose is false, the string is single-line and just returns error codes. - a json representation of the result, suitable for automated parsing/interpretation later. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
4.0 KiB
4.0 KiB