diff options
Diffstat (limited to 'src/vyconf_client.ml')
-rw-r--r-- | src/vyconf_client.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vyconf_client.ml b/src/vyconf_client.ml index f6ce448..5cbd798 100644 --- a/src/vyconf_client.ml +++ b/src/vyconf_client.ml @@ -101,3 +101,10 @@ let show_config client path = | Success -> unwrap resp.output |> Lwt.return | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return +let validate client path = + let req = Validate {path=path; output_format=(Some client.out_format)} in + let%lwt resp = do_request client req in + match resp.status with + | Success -> Lwt.return (Ok "") + | Fail -> Error (Option.value resp.error ~default:"") |> Lwt.return + | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return |