mirror of
https://github.com/XRPLF/clio.git
synced 2026-08-22 05:00:52 +00:00
style: Unify style for all Doxygen comments (#3142)
This commit is contained in:
@@ -116,23 +116,33 @@ public:
|
||||
void
|
||||
rpcFailedToForward(std::string const& method);
|
||||
|
||||
/** @brief Increments the global too busy counter. */
|
||||
/**
|
||||
* @brief Increments the global too busy counter.
|
||||
*/
|
||||
void
|
||||
onTooBusy();
|
||||
|
||||
/** @brief Increments the global not ready counter. */
|
||||
/**
|
||||
* @brief Increments the global not ready counter.
|
||||
*/
|
||||
void
|
||||
onNotReady();
|
||||
|
||||
/** @brief Increments the global bad syntax counter. */
|
||||
/**
|
||||
* @brief Increments the global bad syntax counter.
|
||||
*/
|
||||
void
|
||||
onBadSyntax();
|
||||
|
||||
/** @brief Increments the global unknown command/method counter. */
|
||||
/**
|
||||
* @brief Increments the global unknown command/method counter.
|
||||
*/
|
||||
void
|
||||
onUnknownCommand();
|
||||
|
||||
/** @brief Increments the global internal error counter. */
|
||||
/**
|
||||
* @brief Increments the global internal error counter.
|
||||
*/
|
||||
void
|
||||
onInternalError();
|
||||
|
||||
@@ -145,11 +155,15 @@ public:
|
||||
void
|
||||
recordLedgerRequest(boost::json::object const& params, std::uint32_t currentLedgerSequence);
|
||||
|
||||
/** @return Uptime of this instance in seconds. */
|
||||
/**
|
||||
* @return Uptime of this instance in seconds.
|
||||
*/
|
||||
std::chrono::seconds
|
||||
uptime() const;
|
||||
|
||||
/** @return A JSON report with current state of all counters for every method. */
|
||||
/**
|
||||
* @return A JSON report with current state of all counters for every method.
|
||||
*/
|
||||
boost::json::object
|
||||
report() const;
|
||||
};
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
|
||||
namespace rpc {
|
||||
|
||||
/** @brief Custom clio RPC Errors. */
|
||||
/**
|
||||
* @brief Custom clio RPC Errors.
|
||||
*/
|
||||
enum class ClioError {
|
||||
// normal clio errors start with 5000
|
||||
RpcMalformedCurrency = 5000,
|
||||
@@ -43,14 +45,18 @@ enum class ClioError {
|
||||
EtlInvalidResponse = 7003,
|
||||
};
|
||||
|
||||
/** @brief Holds info about a particular @ref ClioError. */
|
||||
/**
|
||||
* @brief Holds info about a particular @ref ClioError.
|
||||
*/
|
||||
struct ClioErrorInfo {
|
||||
ClioError const code;
|
||||
std::string_view const error;
|
||||
std::string_view const message;
|
||||
};
|
||||
|
||||
/** @brief Clio uses compatible Rippled error codes for most RPC errors. */
|
||||
/**
|
||||
* @brief Clio uses compatible Rippled error codes for most RPC errors.
|
||||
*/
|
||||
using RippledError = xrpl::ErrorCodeI;
|
||||
|
||||
/**
|
||||
@@ -61,7 +67,9 @@ using RippledError = xrpl::ErrorCodeI;
|
||||
*/
|
||||
using CombinedError = std::variant<RippledError, ClioError>;
|
||||
|
||||
/** @brief A status returned from any RPC handler. */
|
||||
/**
|
||||
* @brief A status returned from any RPC handler.
|
||||
*/
|
||||
struct Status {
|
||||
CombinedError code = RippledError::RpcSuccess;
|
||||
std::string error;
|
||||
@@ -177,7 +185,9 @@ struct Status {
|
||||
operator<<(std::ostream& stream, Status const& status);
|
||||
};
|
||||
|
||||
/** @brief Warning codes that can be returned by clio. */
|
||||
/**
|
||||
* @brief Warning codes that can be returned by clio.
|
||||
*/
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-use-enum-class)
|
||||
enum WarningCode {
|
||||
WarnUnknown = -1,
|
||||
@@ -187,7 +197,9 @@ enum WarningCode {
|
||||
WarnRpcDeprecated = 2004
|
||||
};
|
||||
|
||||
/** @brief Holds information about a clio warning. */
|
||||
/**
|
||||
* @brief Holds information about a clio warning.
|
||||
*/
|
||||
struct WarningInfo {
|
||||
constexpr WarningInfo() = default;
|
||||
|
||||
@@ -205,7 +217,9 @@ struct WarningInfo {
|
||||
std::string_view const message = "unknown warning";
|
||||
};
|
||||
|
||||
/** @brief Invalid parameters error. */
|
||||
/**
|
||||
* @brief Invalid parameters error.
|
||||
*/
|
||||
class InvalidParamsError : public std::exception {
|
||||
std::string msg_;
|
||||
|
||||
@@ -231,7 +245,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief Account not found error. */
|
||||
/**
|
||||
* @brief Account not found error.
|
||||
*/
|
||||
class AccountNotFoundError : public std::exception {
|
||||
std::string account_;
|
||||
|
||||
@@ -257,7 +273,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief A globally available @ref rpc::Status that represents a successful state. */
|
||||
/**
|
||||
* @brief A globally available @ref rpc::Status that represents a successful state.
|
||||
*/
|
||||
static Status gOk;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
|
||||
#include <xrpl/protocol/jss.h>
|
||||
|
||||
/** @brief Helper macro for borrowing from xrpl::jss static (J)son (S)trings. */
|
||||
/**
|
||||
* @brief Helper macro for borrowing from xrpl::jss static (J)son (S)trings.
|
||||
*/
|
||||
#define JS(x) xrpl::jss::x.cStr()
|
||||
|
||||
/** @brief Access the lower case copy of a static (J)son (S)tring. */
|
||||
/**
|
||||
* @brief Access the lower case copy of a static (J)son (S)tring.
|
||||
*/
|
||||
#define JSL(x) util::toLower(JS(x))
|
||||
|
||||
/** @brief Provides access to (SF)ield name (S)trings. */
|
||||
/**
|
||||
* @brief Provides access to (SF)ield name (S)trings.
|
||||
*/
|
||||
#define SFS(x) xrpl::x.jsonName.cStr()
|
||||
|
||||
@@ -64,7 +64,9 @@
|
||||
|
||||
namespace rpc {
|
||||
|
||||
/** @brief Enum for NFT json manipulation */
|
||||
/**
|
||||
* @brief Enum for NFT json manipulation
|
||||
*/
|
||||
enum class NFTokenjson { ENABLE, DISABLE };
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,8 +181,9 @@ public:
|
||||
private:
|
||||
/**
|
||||
* @brief Calls callback on the oracle ledger entry
|
||||
If the oracle entry does not contains the price pair, search up to three previous metadata
|
||||
objects. Stops early if the callback returns true.
|
||||
*
|
||||
* If the oracle entry does not contains the price pair, search up to three previous metadata
|
||||
* objects. Stops early if the callback returns true.
|
||||
*/
|
||||
void
|
||||
tracebackOracleObject(
|
||||
|
||||
Reference in New Issue
Block a user