aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/util.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-07-03 10:10:26 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-07-03 11:08:36 -0400
commitaaaaad562790cd4dce1568ae193f5393aacacedf (patch)
treead21f41e6549924a7c1402e9c660744a018b34cf /src/rpc/util.h
parentfa9708f94c01cb8bf2971bdf404af38c38fa341b (diff)
rpc: Add option to hide RPCArg
Also, update switch statments to our style guide
Diffstat (limited to 'src/rpc/util.h')
-rw-r--r--src/rpc/util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/util.h b/src/rpc/util.h
index 49f603c8a1..f49fb1d6b1 100644
--- a/src/rpc/util.h
+++ b/src/rpc/util.h
@@ -144,6 +144,7 @@ struct RPCArg {
using Fallback = boost::variant<Optional, /* default value for optional args */ std::string>;
const std::string m_names; //!< The name of the arg (can be empty for inner args, can contain multiple aliases separated by | for named request arguments)
const Type m_type;
+ const bool m_hidden;
const std::vector<RPCArg> m_inner; //!< Only used for arrays or dicts
const Fallback m_fallback;
const std::string m_description;
@@ -156,9 +157,11 @@ struct RPCArg {
const Fallback fallback,
const std::string description,
const std::string oneline_description = "",
- const std::vector<std::string> type_str = {})
+ const std::vector<std::string> type_str = {},
+ const bool hidden = false)
: m_names{std::move(name)},
m_type{std::move(type)},
+ m_hidden{hidden},
m_fallback{std::move(fallback)},
m_description{std::move(description)},
m_oneline_description{std::move(oneline_description)},
@@ -177,6 +180,7 @@ struct RPCArg {
const std::vector<std::string> type_str = {})
: m_names{std::move(name)},
m_type{std::move(type)},
+ m_hidden{false},
m_inner{std::move(inner)},
m_fallback{std::move(fallback)},
m_description{std::move(description)},