mirror of https://github.com/perkeep/perkeep.git
58 lines
1.9 KiB
HTML
58 lines
1.9 KiB
HTML
<h1>Schema</h1>
|
|
|
|
<p>
|
|
At the lowest layer, Camlistore doesn't care what you put in it
|
|
(everything is just dumb bytes) and you're free to adopt your own
|
|
data model. However, the upper layers of Camlistore standardize on
|
|
a <a href="/gw/doc/schema">common schema</a> to represent various
|
|
classes of data.
|
|
</p>
|
|
|
|
<p>
|
|
Schema blobs are JSON objects with at least two attributes always
|
|
set: <tt>camliVersion</tt>, which is always 1,
|
|
and <tt>camliType</tt>, which tells you the type of metadata the
|
|
blob contains.
|
|
</p>
|
|
|
|
<p>
|
|
Here are some of the data types we've started to formalize
|
|
a <a href="http://json.org/">JSON</a> schema for:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<a href="http://camlistore.org/gw/doc/schema/files">Files</a>:
|
|
traditional filesystems. Files, directories, inodes, symlinks,
|
|
etc. Uses the <tt>file</tt>, <tt>directory</tt>, <tt>symlink</tt>,
|
|
and <tt>inode</tt> camliTypes.
|
|
</li>
|
|
|
|
<li>
|
|
<a href="schema/permanode">Permanodes</a>: the immutable root
|
|
"anchor" of mutable Camlistore objects
|
|
(see <a href="terms">terminology</a>). Users create
|
|
signed <a href="/docs/schema/permanode#claim">claim</a> schema
|
|
blobs which reference a permanode and define some mutation for the
|
|
permanode.
|
|
<br>
|
|
Permanodes are used to model many kinds of mutable data, including
|
|
mutable files, dynamic directories, and more.
|
|
<br>
|
|
Uses the <tt>permanode</tt> and <tt>claim</tt> camliTypes.
|
|
</li>
|
|
|
|
<li>
|
|
<a href="/gw/doc/schema/objects/static-set.txt">Static Sets</a>:
|
|
Immutable lists of other blobs by their refs. Indicated by
|
|
the <tt>static-set</tt> camliType.
|
|
</li>
|
|
|
|
<li>
|
|
<a href="/gw/doc/schema/objects/keep.txt">"Keep" claims</a>:
|
|
Normally, any object that isn't referenced by a permanode could
|
|
theoretically be garbage collected. Keep claims prevent that from
|
|
happening. Indicated by the <tt>keep</tt> camliType.
|
|
</li>
|
|
</ul>
|