shrub/gen/dns-bind/authority.hoon

31 lines
634 B
Plaintext
Raw Normal View History

:: DNS: configure zone authority
::
:::: /hoon/authority/dns/gen
::
2019-06-26 04:41:08 +03:00
/- *dns-bind, *sole
/+ *generators
:- %ask
|= $: [now=@da eny=@uvJ bec=beak]
[arg=$@(~ [dom=turf ~])]
~
==
2019-06-26 04:41:08 +03:00
^- (sole-result [%dns-authority authority])
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ prompt
[%& %dns-domain "dns domain: "]
%+ parse thos:de-purl:html
|= hot=host:eyre
?: ?=(%| -.hot)
~|(%ips-unsupported !!)
%+ prompt
[%& %project "gcloud project: "]
%+ parse urs:ab
|= project=@ta
%+ prompt
[%& %zone "dns zone: "]
%+ parse urs:ab
|= zone=@ta
%- produce
2019-06-26 04:41:08 +03:00
[%dns-authority [p.hot %gcloud project zone ~]]