aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_rcl.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-22 14:25:24 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-22 14:56:37 +0100
commit9c2a259a7c4c1251b51b4cfc54e49f639d80e0c4 (patch)
treee27d971bcc11e9c1e560d387dada32e82b53b907 /src/libserver/cfg_rcl.h
parentcae47edfb5950a877ea94aefd716fbcbb1e5c3a1 (diff)
downloadrspamd-9c2a259a7c4c1251b51b4cfc54e49f639d80e0c4.tar.gz
rspamd-9c2a259a7c4c1251b51b4cfc54e49f639d80e0c4.zip
[Feature] Add ability to add doc strings by example
Diffstat (limited to 'src/libserver/cfg_rcl.h')
-rw-r--r--src/libserver/cfg_rcl.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.h b/src/libserver/cfg_rcl.h
index 6a0d86cb7..a83e9698f 100644
--- a/src/libserver/cfg_rcl.h
+++ b/src/libserver/cfg_rcl.h
@@ -419,4 +419,31 @@ ucl_object_t *rspamd_rcl_add_doc_by_path (struct rspamd_config *cfg,
gint flags,
const char *default_value,
gboolean required);
+
+/**
+ * Parses example and adds documentation according to the example:
+ *
+ * ```
+ * section {
+ * param1 = value; # explanation
+ * param2 = value; # explanation
+ * }
+ * ```
+ *
+ * will produce the following documentation strings:
+ * section ->
+ * section.param1 : explanation
+ * section.param2 : explanation
+ *
+ * @param cfg
+ * @param root_path
+ * @param example_data
+ * @param example_len
+ * @return
+ */
+ucl_object_t *rspamd_rcl_add_doc_by_example (struct rspamd_config *cfg,
+ const gchar *root_path,
+ const gchar *doc_string,
+ const gchar *doc_name,
+ const gchar *example_data, gsize example_len);
#endif /* CFG_RCL_H_ */