mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 05:45:46 +03:00
sur: added metadata-store structures
This commit is contained in:
parent
ca7cc1fc10
commit
9205c7c7db
@ -1,23 +1,10 @@
|
|||||||
:: metadata-store: data store for application metadata and mappings
|
:: metadata-store: data store for application metadata and mappings
|
||||||
:: between groups and application data (chatrooms, publish notebooks, etc)
|
:: between groups and application data (chatrooms, publish notebooks, etc)
|
||||||
::
|
::
|
||||||
|
/- *metadata-store
|
||||||
/+ default-agent
|
/+ default-agent
|
||||||
|%
|
|%
|
||||||
+$ card card:agent:gall
|
+$ card card:agent:gall
|
||||||
+$ group-path path
|
|
||||||
+$ app-name @tas
|
|
||||||
+$ app-path path
|
|
||||||
+$ metadata
|
|
||||||
$: title=@t
|
|
||||||
description=@t
|
|
||||||
color=@ux
|
|
||||||
==
|
|
||||||
::
|
|
||||||
+$ metadata-action
|
|
||||||
$% [%add =group-path =app-name =app-path =metadata]
|
|
||||||
[%remove =group-path =app-name =app-path]
|
|
||||||
==
|
|
||||||
+$ metadata-update metadata-action
|
|
||||||
::
|
::
|
||||||
+$ versioned-state
|
+$ versioned-state
|
||||||
$% state-zero
|
$% state-zero
|
||||||
@ -37,10 +24,10 @@
|
|||||||
^- agent:gall
|
^- agent:gall
|
||||||
=<
|
=<
|
||||||
|_ =bowl:gall
|
|_ =bowl:gall
|
||||||
+* this .
|
+* this .
|
||||||
metadata-core +>
|
metadata-core +>
|
||||||
mc ~(. metadata-core bowl)
|
mc ~(. metadata-core bowl)
|
||||||
def ~(. (default-agent this %|) bowl)
|
def ~(. (default-agent this %|) bowl)
|
||||||
::
|
::
|
||||||
++ on-init on-init:def
|
++ on-init on-init:def
|
||||||
++ on-save !>(state)
|
++ on-save !>(state)
|
||||||
@ -65,7 +52,8 @@
|
|||||||
|^
|
|^
|
||||||
=/ cards=(list card)
|
=/ cards=(list card)
|
||||||
?+ path (on-watch:def path)
|
?+ path (on-watch:def path)
|
||||||
[%all ~] (give %metadata-initial !>(associated))
|
[%all ~] (give %metadata-initial !>(associated))
|
||||||
|
[%updates ~] ~
|
||||||
==
|
==
|
||||||
[cards this]
|
[cards this]
|
||||||
::
|
::
|
||||||
|
18
pkg/arvo/sur/metadata-store.hoon
Normal file
18
pkg/arvo/sur/metadata-store.hoon
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|%
|
||||||
|
+$ group-path path
|
||||||
|
+$ app-name @tas
|
||||||
|
+$ app-path path
|
||||||
|
::
|
||||||
|
+$ metadata
|
||||||
|
$: title=@t
|
||||||
|
description=@t
|
||||||
|
color=@ux
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ metadata-action
|
||||||
|
$% [%add =group-path =app-name =app-path =metadata]
|
||||||
|
[%remove =group-path =app-name =app-path]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
+$ metadata-update metadata-action
|
||||||
|
--
|
Loading…
Reference in New Issue
Block a user