2010-12-02 05:14:07 +00:00
|
|
|
|
TODO:
|
|
|
|
|
-----
|
|
|
|
|
Clean this up and/or break into separate files.
|
|
|
|
|
|
2011-03-13 03:27:45 +00:00
|
|
|
|
{"camliVersion": 1,
|
|
|
|
|
"camliType": "claim",
|
|
|
|
|
"camliSigner": "....",
|
|
|
|
|
"claimDate": "2010-07-10T17:20:03.9212Z", // redundant with data in ascii armored "camliSig",
|
2013-02-25 14:40:36 +00:00
|
|
|
|
// but required. more legible. takes precedence over
|
2011-03-13 03:27:45 +00:00
|
|
|
|
// any date inferred from camliSig
|
|
|
|
|
"permaNode": "dig-xxxxxxx", // what is being modified
|
|
|
|
|
"claimType": "set-attribute",
|
|
|
|
|
"attribute": "camliContent",
|
|
|
|
|
"value": "dig-yyyyyyy",
|
2013-02-25 14:40:36 +00:00
|
|
|
|
"camliSig": .........}
|
2010-12-02 05:14:07 +00:00
|
|
|
|
|
2011-03-13 03:27:45 +00:00
|
|
|
|
claimTypes:
|
|
|
|
|
-----------
|
2013-02-25 14:40:36 +00:00
|
|
|
|
"add-attribute" (adds a value to a multi-valued attribute (e.g. "tag"))
|
|
|
|
|
"set-attribute" (set a single-valued attribute. equivalent to "del-attribute" of "attribute" and then add-attribute)
|
|
|
|
|
"del-attribute" (deletes all values of "attribute", if no "value" given, or just the provided "value" if multi-valued)
|
|
|
|
|
|
|
|
|
|
"multi".. atomically do multiple add/set/del from above on potentially different permanodes. looks like:
|
|
|
|
|
|
|
|
|
|
{"camliVersion": 1,
|
|
|
|
|
"camliType": "claim",
|
|
|
|
|
"claimType": "multi",
|
|
|
|
|
"claimDate": "2013-02-24T17:20:03.9212Z",
|
|
|
|
|
"claims": [
|
|
|
|
|
{"claimType": "set-attribute",
|
|
|
|
|
"permanode": "dig-xxxxxx",
|
|
|
|
|
"attribute": "foo",
|
|
|
|
|
"value": "fooValue"},
|
|
|
|
|
{"claimType": "add-attribute",
|
|
|
|
|
"permanode": "dig-yyyyy",
|
|
|
|
|
"attribute": "tag",
|
|
|
|
|
"value": "funny"}
|
|
|
|
|
],
|
|
|
|
|
"camliSig": .........}
|
2011-03-13 03:27:45 +00:00
|
|
|
|
|
|
|
|
|
Attribute names:
|
|
|
|
|
----------------
|
|
|
|
|
camliContent: a permanode "becoming" something. value is pointer to what it is now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Old notes from July 2010 doc:
|
|
|
|
|
-----------------------------
|
2010-12-02 05:14:07 +00:00
|
|
|
|
Claim types:
|
|
|
|
|
permanode-become:
|
|
|
|
|
-- implies either:
|
|
|
|
|
1) switching from typeless/lifeless virgin pnode into something (dynamic set, filesystem tree, etc)
|
|
|
|
|
2) changing versions of that base metadata (new filesystem snapshot)
|
|
|
|
|
-- ‘permaNode’ is the thing that is changing
|
|
|
|
|
-- ‘contents’ is the current node that represents what permaNode changes to
|
|
|
|
|
set-membership: add a blobref to a dynamic set
|
2013-02-25 14:40:36 +00:00
|
|
|
|
-- "permaNode" is blobref of the dynamic set
|
2010-12-02 05:14:07 +00:00
|
|
|
|
delete-claim: delete another claim (target is claim to delete)
|
2013-02-25 14:40:36 +00:00
|
|
|
|
-- "contents" is the claim blobref you’re deleting
|
2010-12-02 05:14:07 +00:00
|
|
|
|
{set,add}-attribute:
|
|
|
|
|
-- attach a piece of metadata to something.
|
2013-02-25 14:40:36 +00:00
|
|
|
|
-- use set-attribute for single-valued attributes only: highest dated claim wins (of trusted person) e.g. "title", "description"
|
|
|
|
|
-- use add-attribute for multi-valued things. e.g. "tag"
|
2010-12-02 05:14:07 +00:00
|
|
|
|
|
|
|
|
|
Tagging something:
|
2013-02-25 14:40:36 +00:00
|
|
|
|
{"claimType": "add-attribute", //
|
|
|
|
|
"attribute": "tag", // utf-8, should have list of valid attributes names, preferrably not made up by us (open social spec?)
|
|
|
|
|
"value": "funny", // value that doesn’t have lasting value
|
|
|
|
|
"valueRef": "sha1-blobref", // hefty reference to a lasting value
|
2010-12-02 05:14:07 +00:00
|
|
|
|
|
2013-02-25 14:40:36 +00:00
|
|
|
|
"claimer?": "sha1-of-the-dude-who’s-signing",
|
|
|
|
|
"claimDate": "2010-07-10T17:20:03.9212Z",
|
|
|
|
|
"claimType", "permanode-become",
|
|
|
|
|
"permaNode": "sha1-pnode",
|
2010-12-02 05:14:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
filesystem root claim:
|
|
|
|
|
{
|
2013-02-25 14:40:36 +00:00
|
|
|
|
"camliVersion": 1,
|
|
|
|
|
"camliType": "claim",
|
2010-12-02 05:14:07 +00:00
|
|
|
|
|
2013-02-25 14:40:36 +00:00
|
|
|
|
// Stuff for camliType "claim":
|
|
|
|
|
"claimDate": "2010-07-10T17:20:03.9212Z", // redundant with data in ascii armored "camliSig". TODO: resolve
|
|
|
|
|
"claimType", "permanode-become",
|
2010-12-02 05:14:07 +00:00
|
|
|
|
|
2013-02-25 14:40:36 +00:00
|
|
|
|
// Stuff for "permanode-become":
|
|
|
|
|
"permaNode": "sha1-pnode",
|
|
|
|
|
"contents": "sha1-fs-node"
|
2010-12-02 05:14:07 +00:00
|
|
|
|
|
|
|
|
|
,"camliSigner": "digalg-blobref-to-ascii-armor-public-key-of-signer",
|
|
|
|
|
"camliSig": "......"}
|