urbit/pkg/arvo/sur/link-view.hoon
Fang 3e7f0dd9d8
link-view: support %delete and %invite actions
%delete tries to be as local as possible in its impact.
%invite deals with un/managed branching for you.
2020-03-04 22:11:54 +01:00

35 lines
867 B
Plaintext

:: link-view: encapsulating link management
::
|%
++ view-action
$% :: %create: create a new link collection
::
:: with specified metadata and group. %ships creates a new group,
:: :real-group indicates whether it's global (&) or local (|).
::
$: %create
=path
title=@t
description=@t
members=create-members
real-group=?
==
::
:: %delete: remove collection from local metadata & stop syncing
::
:: if the resource is associated with a real group, and we're the owner,
:: this deletes it for everyone
::
[%delete =path]
::
:: %invite: add to resource's group and send invite
::
[%invite =path ships=(set ship)]
==
::
++ create-members
$% [%group =path]
[%ships ships=(set ship)]
==
--