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

57 lines
1.3 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
::
+$ group-path path
+$ app-name term
+$ app-path path
2021-01-12 07:26:19 +03:00
+$ md-resource [=app-name =resource]
+$ association [group=resource =metadata]
+$ associations (map md-resource association)
+$ group-preview
$: group=resource
channels=associations
members=@ud
channel-count=@ud
=metadata
==
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
::
:: $permissions: tag identifying variation in permissions
::
:: This will be passed to the graph-permissions mark
:: conversion to allow for custom permissions.
::
:: %reader-comments: Allow readers to comment, regardless
:: of whether they can write.
:: %$: No variation
::
+$ permissions ?(%reader-comments %$)
2020-02-13 03:50:24 +03:00
+$ metadata
$: title=cord
description=cord
=color
date-created=time
creator=ship
module=term
2021-01-14 04:12:48 +03:00
picture=url
2021-01-21 03:14:19 +03:00
preview=_|
2021-01-20 04:51:07 +03:00
=permissions
2020-02-13 03:50:24 +03:00
==
::
+$ metadata-action
2021-01-12 07:26:19 +03:00
$% [%add group=resource resource=md-resource =metadata]
[%remove group=resource resource=md-resource]
2021-01-13 07:50:37 +03:00
[%initial-group group=resource =associations]
2020-02-13 03:50:24 +03:00
==
::
+$ metadata-update
$% metadata-action
[%associations =associations]
[%updated-metadata group=resource resource=md-resource before=metadata =metadata]
[%preview group-preview]
==
2020-02-13 03:50:24 +03:00
--