summaryrefslogtreecommitdiff
path: root/app/zodiac.hoon
diff options
context:
space:
mode:
Diffstat (limited to 'app/zodiac.hoon')
-rw-r--r--app/zodiac.hoon62
1 files changed, 62 insertions, 0 deletions
diff --git a/app/zodiac.hoon b/app/zodiac.hoon
new file mode 100644
index 0000000..43a5694
--- /dev/null
+++ b/app/zodiac.hoon
@@ -0,0 +1,62 @@
+/- *zodiac
+/= router /web/router
+=| versioned-state
+=* state -
+^- agent:gall
+|_ =bowl:gall
++* this .
+++ on-init
+ ^- (quip card:agent:gall agent:gall)
+ :_ this
+ =/ weblib router(bowl bowl)
+ :~((eyre-binding-card:weblib /zodiac))
+::
+++ on-save
+ ^- vase
+ !>(state)
+::
+++ on-load
+ |~ old-state=vase
+ ^- (quip card:agent:gall agent:gall)
+ `this
+::
+++ on-poke
+ |= [=mark =vase]
+ ^- (quip card:agent:gall agent:gall)
+ ?+ mark `this
+ %handle-http-request
+ =/ order !<([id=@ta req=inbound-request:eyre] vase)
+ =/ weblib ~(. router [bowl id.order req.order state])
+ :- route:weblib this
+ ==
+::
+++ on-watch
+ |~ path
+ ^- (quip card:agent:gall agent:gall)
+ `this
+::
+++ on-leave
+ |~ path
+ ^- (quip card:agent:gall agent:gall)
+ `this
+::
+++ on-peek
+ |~ path
+ ^- (unit (unit cage))
+ ~
+::
+++ on-agent
+ |~ [wire sign:agent:gall]
+ ^- (quip card:agent:gall agent:gall)
+ `this
+::
+++ on-arvo
+ |~ [wire =sign-arvo]
+ ^- (quip card:agent:gall agent:gall)
+ `this
+::
+++ on-fail
+ |~ [term tang]
+ ^- (quip card:agent:gall agent:gall)
+ `this
+--