mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-12 21:16:33 +00:00
chore(falco): apply code formatting
Signed-off-by: Poiana <poiana.bot@gmail.com>
This commit is contained in:
@@ -23,53 +23,55 @@ limitations under the License.
|
||||
#include <libsinsp/version.h>
|
||||
#include "falco_engine_version.h"
|
||||
|
||||
namespace rule_loader
|
||||
{
|
||||
namespace rule_loader {
|
||||
|
||||
/*!
|
||||
\brief Reads the contents of a ruleset
|
||||
*/
|
||||
class reader
|
||||
{
|
||||
class reader {
|
||||
public:
|
||||
reader() = default;
|
||||
virtual ~reader() = default;
|
||||
reader(reader&&) = default;
|
||||
reader& operator = (reader&&) = default;
|
||||
reader() = default;
|
||||
virtual ~reader() = default;
|
||||
reader(reader&&) = default;
|
||||
reader& operator=(reader&&) = default;
|
||||
reader(const reader&) = default;
|
||||
reader& operator = (const reader&) = default;
|
||||
reader& operator=(const reader&) = default;
|
||||
|
||||
/*!
|
||||
\brief Reads the contents of a ruleset and uses a collector to store
|
||||
thew new definitions
|
||||
/*!
|
||||
\brief Reads the contents of a ruleset and uses a collector to store
|
||||
thew new definitions
|
||||
*/
|
||||
virtual bool read(configuration& cfg, collector& loader, const nlohmann::json& schema={});
|
||||
|
||||
/*!
|
||||
\brief Engine version used to be represented as a simple progressive
|
||||
virtual bool read(configuration& cfg, collector& loader, const nlohmann::json& schema = {});
|
||||
|
||||
/*!
|
||||
\brief Engine version used to be represented as a simple progressive
|
||||
number. With the new semver schema, the number now represents
|
||||
the semver minor number. This function converts the legacy version
|
||||
the semver minor number. This function converts the legacy version
|
||||
number to the new semver schema.
|
||||
*/
|
||||
static inline sinsp_version get_implicit_engine_version(uint32_t minor)
|
||||
{
|
||||
return sinsp_version(std::to_string(FALCO_ENGINE_VERSION_MAJOR) + "."
|
||||
+ std::to_string(minor) + "."
|
||||
+ std::to_string(FALCO_ENGINE_VERSION_PATCH));
|
||||
*/
|
||||
static inline sinsp_version get_implicit_engine_version(uint32_t minor) {
|
||||
return sinsp_version(std::to_string(FALCO_ENGINE_VERSION_MAJOR) + "." +
|
||||
std::to_string(minor) + "." +
|
||||
std::to_string(FALCO_ENGINE_VERSION_PATCH));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static void decode_val(const YAML::Node& item, const char *key, T& out, const rule_loader::context& ctx);
|
||||
template<typename T>
|
||||
static void decode_val(const YAML::Node& item,
|
||||
const char* key,
|
||||
T& out,
|
||||
const rule_loader::context& ctx);
|
||||
|
||||
template <typename T>
|
||||
static void decode_optional_val(const YAML::Node& item, const char *key, T& out, const rule_loader::context& ctx);
|
||||
template<typename T>
|
||||
static void decode_optional_val(const YAML::Node& item,
|
||||
const char* key,
|
||||
T& out,
|
||||
const rule_loader::context& ctx);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void read_item(rule_loader::configuration& cfg,
|
||||
rule_loader::collector& collector,
|
||||
const YAML::Node& item,
|
||||
const rule_loader::context& parent);
|
||||
rule_loader::collector& collector,
|
||||
const YAML::Node& item,
|
||||
const rule_loader::context& parent);
|
||||
};
|
||||
|
||||
}; // namespace rule_loader
|
||||
}; // namespace rule_loader
|
||||
|
Reference in New Issue
Block a user