etherpad-lite/out/doc/database.html
2013-03-20 01:11:27 +00:00

132 lines
6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database structure - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-database">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#database_database_structure">Database structure</a><ul>
<li><a href="#database_keys_and_their_values">Keys and their values</a><ul>
<li><a href="#database_groups">groups</a></li>
<li><a href="#database_pad_padid">pad:$PADID</a></li>
<li><a href="#database_pad_padid_revs_revnum">pad:$PADID:revs:$REVNUM</a></li>
<li><a href="#database_pad_padid_chat_chatnum">pad:$PADID:chat:$CHATNUM</a></li>
<li><a href="#database_pad2readonly_padid">pad2readonly:$PADID</a></li>
<li><a href="#database_readonly2pad_readonlyid">readonly2pad:$READONLYID</a></li>
<li><a href="#database_token2author_tokenid">token2author:$TOKENID</a></li>
<li><a href="#database_globalauthor_authorid">globalAuthor:$AUTHORID</a></li>
<li><a href="#database_mapper2group_mapper">mapper2group:$MAPPER</a></li>
<li><a href="#database_mapper2author_mapper">mapper2author:$MAPPER</a></li>
<li><a href="#database_group_groupid">group:$GROUPID</a></li>
<li><a href="#database_session_sessionid">session:$SESSIONID</a></li>
<li><a href="#database_author2sessions_authorid">author2sessions:$AUTHORID</a></li>
<li><a href="#database_group2sessions_groupid">group2sessions:$GROUPID</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Database structure<span><a class="mark" href="#database_database_structure" id="database_database_structure">#</a></span></h1>
<h2>Keys and their values<span><a class="mark" href="#database_keys_and_their_values" id="database_keys_and_their_values">#</a></span></h2>
<h3>groups<span><a class="mark" href="#database_groups" id="database_groups">#</a></span></h3>
<p>A list of all existing groups (a JSON object with groupIDs as keys and <code>1</code> as values).
</p>
<h3>pad:$PADID<span><a class="mark" href="#database_pad_padid" id="database_pad_padid">#</a></span></h3>
<p>Saves all informations about pads
</p>
<ul>
<li><strong>atext</strong> - the latest attributed text</li>
<li><strong>pool</strong> - the attribute pool</li>
<li><strong>head</strong> - the number of the latest revision</li>
<li><strong>chatHead</strong> - the number of the latest chat entry</li>
<li><strong>public</strong> - flag that disables security for this pad</li>
<li><strong>passwordHash</strong> - string that contains a bcrypt hashed password for this pad</li>
</ul>
<h3>pad:$PADID:revs:$REVNUM<span><a class="mark" href="#database_pad_padid_revs_revnum" id="database_pad_padid_revs_revnum">#</a></span></h3>
<p>Saves a revision $REVNUM of pad $PADID
</p>
<ul>
<li><strong>meta</strong><ul>
<li><strong>author</strong> - the autorID of this revision</li>
<li><strong>timestamp</strong> - the timestamp of when this revision was created</li>
</ul>
</li>
<li><strong>changeset</strong> - the changeset of this revision</li>
</ul>
<h3>pad:$PADID:chat:$CHATNUM<span><a class="mark" href="#database_pad_padid_chat_chatnum" id="database_pad_padid_chat_chatnum">#</a></span></h3>
<p>Saves a chatentry with num $CHATNUM of pad $PADID
</p>
<ul>
<li><strong>text</strong> - the text of this chat entry</li>
<li><strong>userId</strong> - the autorID of this chat entry</li>
<li><strong>time</strong> - the timestamp of this chat entry</li>
</ul>
<h3>pad2readonly:$PADID<span><a class="mark" href="#database_pad2readonly_padid" id="database_pad2readonly_padid">#</a></span></h3>
<p>Translates a padID to a readonlyID
</p>
<h3>readonly2pad:$READONLYID<span><a class="mark" href="#database_readonly2pad_readonlyid" id="database_readonly2pad_readonlyid">#</a></span></h3>
<p>Translates a readonlyID to a padID
</p>
<h3>token2author:$TOKENID<span><a class="mark" href="#database_token2author_tokenid" id="database_token2author_tokenid">#</a></span></h3>
<p>Translates a token to an authorID
</p>
<h3>globalAuthor:$AUTHORID<span><a class="mark" href="#database_globalauthor_authorid" id="database_globalauthor_authorid">#</a></span></h3>
<p>Information about an author
</p>
<ul>
<li><strong>name</strong> - the name of this author as shown in the pad</li>
<li><strong>colorID</strong> - the colorID of this author as shown in the pad</li>
</ul>
<h3>mapper2group:$MAPPER<span><a class="mark" href="#database_mapper2group_mapper" id="database_mapper2group_mapper">#</a></span></h3>
<p>Maps an external application identifier to an internal group
</p>
<h3>mapper2author:$MAPPER<span><a class="mark" href="#database_mapper2author_mapper" id="database_mapper2author_mapper">#</a></span></h3>
<p>Maps an external application identifier to an internal author
</p>
<h3>group:$GROUPID<span><a class="mark" href="#database_group_groupid" id="database_group_groupid">#</a></span></h3>
<p>a group of pads
</p>
<ul>
<li><strong>pads</strong> - object with pad names in it, values are 1<h3>session:$SESSIONID<span><a class="mark" href="#database_session_sessionid" id="database_session_sessionid">#</a></span></h3>
a session between an author and a group</li>
</ul>
<ul>
<li><strong>groupID</strong> - the groupID the session belongs too</li>
<li><strong>authorID</strong> - the authorID the session belongs too</li>
<li><strong>validUntil</strong> - the timestamp until this session is valid</li>
</ul>
<h3>author2sessions:$AUTHORID<span><a class="mark" href="#database_author2sessions_authorid" id="database_author2sessions_authorid">#</a></span></h3>
<p>saves the sessions of an author
</p>
<ul>
<li><strong>sessionsIDs</strong> - object with sessionIDs in it, values are 1</li>
</ul>
<h3>group2sessions:$GROUPID<span><a class="mark" href="#database_group2sessions_groupid" id="database_group2sessions_groupid">#</a></span></h3>
<div class="signature"><ul>
<li><strong>sessionsIDs</strong> - object with sessionIDs in it, values are 1</li>
</div></ul>
</div>
</body>
</html>