#include "main/iroha_conf_loader.hpp"#include <cctype>#include <cstddef>#include <cstdlib>#include <fstream>#include <functional>#include <iterator>#include <limits>#include <optional>#include <ostream>#include <sstream>#include <string>#include <string_view>#include <type_traits>#include <fmt/core.h>#include <fmt/format.h>#include <rapidjson/document.h>#include <rapidjson/error/en.h>#include <rapidjson/rapidjson.h>#include <boost/algorithm/string/join.hpp>#include <boost/range/adaptor/map.hpp>#include "common/bind.hpp"#include "common/files.hpp"#include "common/result.hpp"#include "logger/logger.hpp"#include "main/iroha_conf_literals.hpp"#include "torii/tls_params.hpp"
Classes | |
| class | ConfigParsingException |
| class | JsonDeserializerImpl |
Typedefs | |
| using | ConstJsonValRef = std::reference_wrapper< rapidjson::Value const > |
Functions | |
| std::optional< std::string_view > | getOptEnvRaw (std::string_view key, std::optional< logger::LoggerPtr > log) |
| void | assert_fatal (bool condition, std::string_view printable_path, std::string error) |
| logger::LogLevel | getLogLevel (std::string level_str, std::string_view printable_path) |
| std::string | makeEnvDictChildKey (std::string_view base_path, std::string_view child_key) |
| template<typename T , typename = decltype(std::to_string(std::declval<T>()))> | |
| std::string | makeEnvDictChildKey (std::string_view base_path, T const &child_key) |
| template<> | |
| bool | JsonDeserializerImpl::loadInto< std::shared_ptr< shared_model::interface::Peer > > (std::shared_ptr< shared_model::interface::Peer > &dest) |
| void | reportJsonParsingError (const rapidjson::Document &doc, const std::string &text) |
| iroha::expected::Result< IrohadConfig, std::string > | parse_iroha_config (const std::string &conf_path, std::shared_ptr< shared_model::interface::CommonObjectsFactory > common_objects_factory, std::optional< logger::LoggerPtr > log) |
Variables | |
| static constexpr size_t | kBadJsonPrintLength = 15 |
| static constexpr size_t | kBadJsonPrintOffsset = 5 |
| The offset of printed chunk towards file start from the error position. More... | |
| static char const * | kEnvVarPrefix = "IROHA" |
| using ConstJsonValRef = std::reference_wrapper<rapidjson::Value const> |
|
inline |
Throws a runtime exception if the given condition is false.
| condition | |
| error | - error message |

|
inline |


| std::optional<std::string_view> getOptEnvRaw | ( | std::string_view | key, |
| std::optional< logger::LoggerPtr > | log | ||
| ) |

|
inline |

| std::string makeEnvDictChildKey | ( | std::string_view | base_path, |
| std::string_view | child_key | ||
| ) |

| std::string makeEnvDictChildKey | ( | std::string_view | base_path, |
| T const & | child_key | ||
| ) |

| iroha::expected::Result<IrohadConfig, std::string> parse_iroha_config | ( | const std::string & | conf_path, |
| std::shared_ptr< shared_model::interface::CommonObjectsFactory > | common_objects_factory, | ||
| std::optional< logger::LoggerPtr > | log | ||
| ) |
parse and assert trusted peers json in iroha.conf
| conf_text | is the contents of iroha's config file |


| void reportJsonParsingError | ( | const rapidjson::Document & | doc, |
| const std::string & | text | ||
| ) |

|
static |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0The length of the string around the error place to print in case of JSON syntax error.
|
static |
The offset of printed chunk towards file start from the error position.
|
static |