summaryrefslogtreecommitdiff
path: root/src/reference_tree.mli
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-12-18 12:29:34 -0600
committerGitHub <noreply@github.com>2025-12-18 12:29:34 -0600
commit008fefbe2c7dc1681d968ac0582087cd429d6796 (patch)
tree06f0fda2253cd5415632d3a45fa894261fa233cc /src/reference_tree.mli
parentb63d13877a5b1f97391193c9857e8e20e0c6fa71 (diff)
parent61bb74851b0ea626a25b66b2822edc6663d116e9 (diff)
downloadvyos1x-config-008fefbe2c7dc1681d968ac0582087cd429d6796.tar.gz
vyos1x-config-008fefbe2c7dc1681d968ac0582087cd429d6796.zip
Merge pull request #59 from jestabro/vyconf-completion-env
T8061: Add analogues of cli-shell-api completion functions
Diffstat (limited to 'src/reference_tree.mli')
-rw-r--r--src/reference_tree.mli19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/reference_tree.mli b/src/reference_tree.mli
index c2805ae..96cb24f 100644
--- a/src/reference_tree.mli
+++ b/src/reference_tree.mli
@@ -1,7 +1,9 @@
-type node_type =
- | Leaf
- | Tag
- | Other
+type node_type = [ `Leaf | `Tag | `Other ]
+
+type path_type = [ node_type | `Tag_value | `Leaf_value | `Multi | `Invalid ]
+
+val path_type_to_yojson : path_type -> Yojson.Safe.t
+val path_type_of_yojson : Yojson.Safe.t -> (path_type, string) result
type completion_help_type =
| List of string [@name "list"]
@@ -104,12 +106,11 @@ val get_value_help : t -> string list -> (string * string) list
[@@alert exn "Vytree.Empty_path"]
[@@alert exn "Vytree.Nonexistent_path"]
-val get_completion_data : t -> string list -> (node_type * bool * string) list
+val get_default_value : t -> string list -> string option
[@@alert exn "Vytree.Empty_path"]
[@@alert exn "Vytree.Nonexistent_path"]
val refpath : t -> string list -> string list
-[@@alert exn "Vytree.Nonexistent_path"]
val set_tag_data : t -> Config_tree.t -> string list -> Config_tree.t
[@@alert exn "Vytree.Empty_path"]
@@ -119,6 +120,12 @@ val set_leaf_data : t -> Config_tree.t -> string list -> Config_tree.t
[@@alert exn "Vytree.Empty_path"]
[@@alert exn "Vytree.Nonexistent_path"]
+val reference_path_exists : t -> string list -> bool
+
+val get_path_type : t -> string list -> path_type
+
+val get_path_type_str : ?legacy_format:bool -> t -> string list -> string
+
val allowed_edit_level : t -> string list -> (unit, string) result
val get_ceil_data : (ref_node_data -> string option) -> t -> string list -> string option