urbit/pkg/arvo/sur/metadata-store.hoon

139 lines
2.9 KiB
Plaintext
Raw Normal View History

2021-01-12 07:26:19 +03:00
/- *resource
^?
2020-02-13 03:50:24 +03:00
|%
2021-01-12 07:26:19 +03:00
::
+$ app-name term
2021-01-12 07:26:19 +03:00
+$ md-resource [=app-name =resource]
2021-01-28 09:13:57 +03:00
+$ association [group=resource =metadatum]
+$ associations (map md-resource association)
+$ group-preview
$: group=resource
channels=associations
members=@ud
channel-count=@ud
2021-01-28 09:13:57 +03:00
=metadatum
==
2020-02-13 03:50:24 +03:00
::
+$ color @ux
2021-01-14 04:12:48 +03:00
+$ url @t
2021-01-20 04:51:07 +03:00
::
2021-01-26 04:46:06 +03:00
:: $vip-metadata: variation in permissions
2021-01-20 04:51:07 +03:00
::
:: This will be passed to the graph-permissions mark
:: conversion to allow for custom permissions.
::
:: %reader-comments: Allow readers to comment, regardless
2021-01-26 04:46:06 +03:00
:: of whether they can write. (notebook, collections)
:: %member-metadata: Allow members to add channels (groups)
2021-04-02 04:48:09 +03:00
:: %host-feed: Only host can post to group feed
:: %admin-feed: Only admins and host can post to group feed
2021-01-20 04:51:07 +03:00
:: %$: No variation
::
2021-04-02 04:48:09 +03:00
+$ vip-metadata
$? %reader-comments
%member-metadata
%host-feed
%admin-feed
%$
==
::
+$ md-config
$~ [%empty ~]
$% [%group feed=(unit (unit md-resource))]
[%graph module=term]
[%empty ~]
==
::
2021-07-09 05:14:06 +03:00
+$ edit-field
$% [%title title=cord]
[%description description=cord]
[%color color=@ux]
[%picture =url]
[%preview preview=?]
[%hidden hidden=?]
[%vip vip=vip-metadata]
==
::
2021-01-28 09:13:57 +03:00
+$ metadatum
$: title=cord
description=cord
=color
date-created=time
creator=ship
config=md-config
2021-01-14 04:12:48 +03:00
picture=url
2021-01-26 04:46:06 +03:00
preview=?
hidden=?
2021-01-26 04:46:06 +03:00
vip=vip-metadata
2020-02-13 03:50:24 +03:00
==
::
2021-01-28 09:13:57 +03:00
+$ action
$% [%add group=resource resource=md-resource =metadatum]
2021-01-12 07:26:19 +03:00
[%remove group=resource resource=md-resource]
2021-07-09 05:14:06 +03:00
[%edit group=resource resource=md-resource =edit-field]
2021-01-13 07:50:37 +03:00
[%initial-group group=resource =associations]
2020-02-13 03:50:24 +03:00
==
::
2021-01-28 09:13:57 +03:00
+$ hook-update
$% [%req-preview group=resource]
[%preview group-preview]
==
::
2021-01-28 09:13:57 +03:00
+$ update
$% action
[%associations =associations]
2021-01-28 09:13:57 +03:00
$: %updated-metadata
group=resource
resource=md-resource
before=metadatum
=metadatum
==
==
2021-04-03 03:31:36 +03:00
:: historical
2021-07-09 05:54:55 +03:00
++ one
|%
::
+$ action
$~ [%remove *resource *md-resource]
$< %edit ^action
::
+$ update
$~ [%remove *resource *md-resource]
$< %edit ^update
::
--
2021-04-03 03:31:36 +03:00
++ zero
|%
::
+$ association [group=resource =metadatum]
::
+$ associations (map md-resource association)
::
+$ metadatum
$: title=cord
description=cord
=color
date-created=time
creator=ship
module=term
picture=url
preview=?
vip=vip-metadata
==
::
+$ update
$% [%add group=resource resource=md-resource =metadatum]
[%remove group=resource resource=md-resource]
[%initial-group group=resource =associations]
[%associations =associations]
$: %updated-metadata
group=resource
resource=md-resource
before=metadatum
=metadatum
==
==
::
--
2020-02-13 03:50:24 +03:00
--