JJ: Description from the destination commit:
mv data/ default/ JJ: Description from source commit: ~
This commit is contained in:
parent
0a45e7fe95
commit
28be109de6
13 changed files with 38 additions and 37 deletions
|
|
@ -1,4 +1,7 @@
|
|||
(* TODO
|
||||
change download_cmd/upload_cmd
|
||||
change arguments: '_' -> '-'
|
||||
|
||||
all management operations:
|
||||
/management/wire
|
||||
/management/wire/disable
|
||||
|
|
@ -65,18 +68,9 @@ module Arg = struct
|
|||
Arg.Conv.make ~docv:"eddsa public key argument" ~parser ~pp ()
|
||||
end
|
||||
|
||||
let default_master_offline_key_file = "data/master_offline_private_key"
|
||||
(*
|
||||
let default_response_file = "response.json"
|
||||
let default_request_file = "request.json"
|
||||
*)
|
||||
|
||||
let master_key =
|
||||
let doc = "Master offline Eddsa private key file." in
|
||||
Arg.(
|
||||
value
|
||||
& opt file default_master_offline_key_file
|
||||
& info [ "master_key_file" ] ~doc)
|
||||
Arg.(required & opt (some file) None & info [ "master_key" ] ~doc)
|
||||
|
||||
let input =
|
||||
let doc = "input file" in
|
||||
|
|
@ -94,10 +88,7 @@ let setup_cmd =
|
|||
let doc = "Generate offline master keys" in
|
||||
let output =
|
||||
let doc = "output file" in
|
||||
Arg.(
|
||||
value
|
||||
& opt filepath default_master_offline_key_file
|
||||
& info [ "o"; "output" ] ~doc)
|
||||
Arg.(required & opt (some filepath) None & info [ "o"; "output" ] ~doc)
|
||||
in
|
||||
Cmd.make (Cmd.info "setup" ~doc)
|
||||
@@
|
||||
|
|
@ -105,17 +96,14 @@ let setup_cmd =
|
|||
setup ~output
|
||||
|
||||
let download_cmd =
|
||||
let doc = "GET /management/keys/" in
|
||||
let man =
|
||||
[ `S Manpage.s_description; `P "$(cmd) download /management/keys." ]
|
||||
in
|
||||
Cmd.make (Cmd.info "download" ~doc ~man)
|
||||
let doc = "GET" in
|
||||
Cmd.make (Cmd.info "download" ~doc)
|
||||
@@
|
||||
let+ output = output in
|
||||
download ~output
|
||||
|
||||
let upload_cmd =
|
||||
let doc = "POST input.json data to url (default /management/keys)" in
|
||||
let doc = "POST" in
|
||||
Cmd.make (Cmd.info "upload" ~doc)
|
||||
@@
|
||||
let+ input = input and+ url = url in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue