entityName: move pieces into handler object
Move different items used by the handler into the handler and enable
unit-testing by parameterizing different aspects of the code.
Tested: Only ran unit-tests (added new ones).
Change-Id: Ia3b4b5792c0ac1ae5bc6513eadfc9ee35f7a369f
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/util.hpp b/util.hpp
new file mode 100644
index 0000000..d98a6cc
--- /dev/null
+++ b/util.hpp
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <nlohmann/json.hpp>
+#include <string>
+
+namespace google
+{
+namespace ipmi
+{
+
+/**
+ * Parse a file and return the json object.
+ *
+ * @param[in] file - the path to the file to parse.
+ * @return the json object if valid.
+ * @throw elog<InternalFailure> on failures.
+ */
+nlohmann::json parseConfig(const std::string& file);
+
+} // namespace ipmi
+} // namespace google