mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
marks: add graph-view marks
This commit is contained in:
parent
2a9c1bf3fa
commit
ff1219bbda
62
pkg/arvo/lib/graph-view.hoon
Normal file
62
pkg/arvo/lib/graph-view.hoon
Normal file
@ -0,0 +1,62 @@
|
||||
/- sur=graph-view
|
||||
/+ resource, group-store
|
||||
^?
|
||||
=< [sur .]
|
||||
=, sur
|
||||
|%
|
||||
++ app-to-mark
|
||||
|= app=app-name
|
||||
?+ app !!
|
||||
%chat %graph-validator-chat
|
||||
==
|
||||
++ dejs
|
||||
=, dejs:format
|
||||
|%
|
||||
++ action
|
||||
|^
|
||||
^- $-(json ^action)
|
||||
%- of
|
||||
:~ create+create
|
||||
delete+delete
|
||||
join+join
|
||||
::groupify+groupify
|
||||
::invite+invite
|
||||
==
|
||||
::
|
||||
++ create
|
||||
%- ot
|
||||
:~ resource+dejs:resource
|
||||
title+so
|
||||
description+so
|
||||
app+app
|
||||
associated+associated
|
||||
==
|
||||
++ app
|
||||
|= jon=json
|
||||
^- app-name
|
||||
?> ?=(%s -.jon)
|
||||
~! app-name
|
||||
%chat
|
||||
::
|
||||
++ delete
|
||||
%- ot
|
||||
:~ resource+dejs:resource
|
||||
==
|
||||
::
|
||||
++ join
|
||||
%- ot
|
||||
:~ resource+dejs:resource
|
||||
ship+(su ;~(pfix sig fed:ag))
|
||||
==
|
||||
::
|
||||
++ groupify !!
|
||||
++ invite !!
|
||||
++ associated
|
||||
%- of
|
||||
:~ group+dejs:resource
|
||||
policy+policy:dejs:group-store
|
||||
==
|
||||
|
||||
--
|
||||
--
|
||||
--
|
@ -243,7 +243,8 @@
|
||||
::
|
||||
++ scry
|
||||
|* [=mold =path]
|
||||
=/ m (strand mold)
|
||||
=/ m (strand ,mold)
|
||||
^- form:m
|
||||
?> ?=(^ path)
|
||||
?> ?=(^ t.path)
|
||||
;< =bowl:spider bind:m get-bowl
|
||||
|
@ -1,7 +1,9 @@
|
||||
/+ *graph-store
|
||||
|_ upd=update
|
||||
++ grad %noun
|
||||
++ grow
|
||||
|%
|
||||
++ noun upd
|
||||
++ json (update:enjs upd)
|
||||
--
|
||||
::
|
||||
|
13
pkg/arvo/mar/graph/view-action.hoon
Normal file
13
pkg/arvo/mar/graph/view-action.hoon
Normal file
@ -0,0 +1,13 @@
|
||||
/+ *graph-view
|
||||
|_ act=action
|
||||
++ grad %noun
|
||||
++ grow
|
||||
|%
|
||||
++ noun act
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun action
|
||||
++ json action:dejs
|
||||
--
|
||||
--
|
@ -1,7 +1,17 @@
|
||||
/- group
|
||||
/- *group
|
||||
/+ resource
|
||||
^?
|
||||
|%
|
||||
:: $associated: A group to associate, or a policy if it is unmanaged
|
||||
::
|
||||
+$ associated
|
||||
$% [%group rid=resource]
|
||||
[%policy =policy]
|
||||
==
|
||||
:: $app: An app that is associated to a graph-store mark
|
||||
::
|
||||
+$ app-name ?(%chat %publish %links)
|
||||
::
|
||||
:: $error: An error from a graph-view poke
|
||||
::
|
||||
:: %offline: Ship is offline
|
||||
@ -24,13 +34,13 @@
|
||||
rid=resource
|
||||
title=@t
|
||||
description=@t
|
||||
mark=(unit mark)
|
||||
associated=(each resource policy:group)
|
||||
app=app-name
|
||||
=associated
|
||||
==
|
||||
[%delete rid=resource ~]
|
||||
[%delete rid=resource]
|
||||
[%join rid=resource =ship]
|
||||
[%invite rid=resource ships=(set ship)]
|
||||
[%groupify rid=resource title=@t description=@t]
|
||||
::[%invite rid=resource ships=(set ship)]
|
||||
:: [%groupify rid=resource title=@t description=@t]
|
||||
==
|
||||
--
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user