webgme-engine
Version:
WebGME server and Client API without a GUI
840 lines (258 loc) • 14.7 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: Storage</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: Storage</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>pmeijer / https://github.com/pmeijer</li>
</ul>
</dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="common_storage_constants.js.html">common/storage/constants.js</a>, <a href="common_storage_constants.js.html#line3">line 3</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Type Definitions</h3>
<h4 class="name" id="~CommitHash">CommitHash</h4>
<div class="description">
<p>Unique SHA-1 hash for commit object.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type"><a href="global.html#string">string</a></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="common_storage_constants.js.html">common/storage/constants.js</a>, <a href="common_storage_constants.js.html#line8">line 8</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>'#5496cf226542fcceccf89056f0d27564abc88c99'</code></pre>
<h4 class="name" id="~CommitObject">CommitObject</h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type"><a href="global.html#object">object</a></span>
</li>
</ul>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>_id</code></td>
<td class="type">
<span class="param-type"><a href="module-Storage.html#~CommitHash">module:Storage~CommitHash</a></span>
</td>
<td class="description last"><p>Hash of the commit object, a.k.a commitHash.</p></td>
</tr>
<tr>
<td class="name"><code>root</code></td>
<td class="type">
<span class="param-type"><a href="module-Core.html#~ObjectHash">module:Core~ObjectHash</a></span>
</td>
<td class="description last"><p>Hash of the associated root object, a.k.a. rootHash.</p></td>
</tr>
<tr>
<td class="name"><code>parents</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Array">Array</a>.<<a href="module-Storage.html#~CommitHash">module:Storage~CommitHash</a>></span>
</td>
<td class="description last"><p>Commits from where this commit evolved.</p></td>
</tr>
<tr>
<td class="name"><code>time</code></td>
<td class="type">
<span class="param-type"><a href="global.html#number">number</a></span>
</td>
<td class="description last"><p>When the commit object was created Date.now().</p></td>
</tr>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>Commit message.</p></td>
</tr>
<tr>
<td class="name"><code>updater</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Array">Array</a>.<<a href="global.html#string">string</a>></span>
</td>
<td class="description last"><p>Commit message.</p></td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>'commit'</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="common_storage_constants.js.html">common/storage/constants.js</a>, <a href="common_storage_constants.js.html#line30">line 30</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>{
_id: '#5496cf226542fcceccf89056f0d27564abc88c99',
root: '#04009ecd1e68117cd3e9d39c87aadd9ed1ee5cb3',
parents: ['#87d9fd309ec6a5d84776d7731ce1f1ab2790aac2']
updater: ['guest'],
time: 1430169614741,
message: "createChildren({\"/1008889918/1998840078\":\"/1182870936/737997118/1736829087/1966323860\"})",
type: 'commit'
}</code></pre>
<h4 class="name" id="~CommitResult">CommitResult</h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type"><a href="global.html#object">object</a></span>
</li>
</ul>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hash</code></td>
<td class="type">
<span class="param-type"><a href="module-Storage.html#~CommitHash">module:Storage~CommitHash</a></span>
</td>
<td class="description last"><p>The commitHash for the commit.</p></td>
</tr>
<tr>
<td class="name"><code>status</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>'SYNCED', 'FORKED', 'CANCELED', undefined</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="common_storage_constants.js.html">common/storage/constants.js</a>, <a href="common_storage_constants.js.html#line14">line 14</a>
</li></ul></dd>
</dl>
<h5>Examples</h5>
<pre class="prettyprint"><code>{
status: 'SYNCED',
hash: '#someHash'
}</code></pre>
<pre class="prettyprint"><code>{
hash: '<hash from makeCommit with no branch provided>'
}</code></pre>
<h4 class="name" id="~PatchObject">PatchObject</h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type"><a href="global.html#object">object</a></span>
</li>
</ul>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>_id</code></td>
<td class="type">
<span class="param-type"><a href="module-Core.html#~ObjectHash">module:Core~ObjectHash</a></span>
</td>
<td class="description last"><p>Hash of the expected result object.</p></td>
</tr>
<tr>
<td class="name"><code>base</code></td>
<td class="type">
<span class="param-type"><a href="module-Core.html#~ObjectHash">module:Core~ObjectHash</a></span>
</td>
<td class="description last"><p>Hash of the base object where the patch should be applied.</p></td>
</tr>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>'patch'.</p></td>
</tr>
<tr>
<td class="name"><code>patch</code></td>
<td class="type">
<span class="param-type"><a href="global.html#object">object</a></span>
</td>
<td class="description last"><p>The patch instructions (based on <a href="http://tools.ietf.org/html/rfc6902">RFC6902</a>).</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="common_storage_constants.js.html">common/storage/constants.js</a>, <a href="common_storage_constants.js.html#line52">line 52</a>
</li></ul></dd>
</dl>
<h5>Example</h5>
<pre class="prettyprint"><code>{
_id: '#5496cf226542fcceccf89056f0d27564abc88c99',
base: '#04009ecd1e68117cd3e9d39c87aadd9ed1ee5cb3',
type: 'patch',
patch: [{op: 'add', path: '/atr/new', value: 'value'}]
}</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Server_GMEAuth.html">Server:GMEAuth</a></li><li><a href="Server_SafeStorage.html">Server:SafeStorage</a></li><li><a href="Server_UserProject.html">Server:UserProject</a></li><li><a href="module-Core.html">Core</a></li><li><a href="module-Storage.html">Storage</a></li><li><a href="module-crosscuts.html">crosscuts</a></li><li><a href="module-serialization.html">serialization</a></li></ul><h3>Externals</h3><ul><li><a href="external-Promise.html">Promise</a></li></ul><h3>Classes</h3><ul><li><a href="AddOnBase.html">AddOnBase</a></li><li><a href="AddOnUpdateResult.html">AddOnUpdateResult</a></li><li><a href="Artifact.html">Artifact</a></li><li><a href="BlobClient.html">BlobClient</a></li><li><a href="BlobMetadata.html">BlobMetadata</a></li><li><a href="BlobRunPluginClient.html">BlobRunPluginClient</a></li><li><a href="Client.html">Client</a></li><li><a href="Core.html">Core</a></li><li><a href="ExecutorClient.html">ExecutorClient</a></li><li><a href="GMENode.html">GMENode</a></li><li><a href="GmeLogger.html">GmeLogger</a></li><li><a href="InterPluginResult.html">InterPluginResult</a></li><li><a href="JobInfo.html">JobInfo</a></li><li><a href="OutputInfo.html">OutputInfo</a></li><li><a href="PluginBase.html">PluginBase</a></li><li><a href="PluginConfig.html">PluginConfig</a></li><li><a href="PluginMessage.html">PluginMessage</a></li><li><a href="PluginNodeDescription.html">PluginNodeDescription</a></li><li><a href="PluginResult.html">PluginResult</a></li><li><a href="Project.html">Project</a></li><li><a href="ProjectInterface.html">ProjectInterface</a></li><li><a href="Server_GMEAuth-GMEAuth.html">GMEAuth</a></li><li><a href="Server_SafeStorage-SafeStorage.html">SafeStorage</a></li><li><a href="Server_UserProject-UserProject.html">UserProject</a></li><li><a href="WebsocketRouter.html">WebsocketRouter</a></li><li><a href="WebsocketRouterUser.html">WebsocketRouterUser</a></li></ul><h3>Events</h3><ul><li><a href="Client.html#event:BRANCH_CHANGED">BRANCH_CHANGED</a></li><li><a href="Client.html#event:BRANCH_CLOSED">BRANCH_CLOSED</a></li><li><a href="Client.html#event:BRANCH_OPENED">BRANCH_OPENED</a></li><li><a href="Client.html#event:BRANCH_STATUS_CHANGED">BRANCH_STATUS_CHANGED</a></li><li><a href="Client.html#event:CONNECTED_USERS_CHANGED">CONNECTED_USERS_CHANGED</a></li><li><a href="Client.html#event:NETWORK_STATUS_CHANGED">NETWORK_STATUS_CHANGED</a></li><li><a href="Client.html#event:NOTIFICATION">NOTIFICATION</a></li><li><a href="Client.html#event:PLUGIN_FINISHED">PLUGIN_FINISHED</a></li><li><a href="Client.html#event:PLUGIN_INITIATED">PLUGIN_INITIATED</a></li><li><a href="Client.html#event:PLUGIN_NOTIFICATION">PLUGIN_NOTIFICATION</a></li><li><a href="Client.html#event:PROJECT_CLOSED">PROJECT_CLOSED</a></li><li><a href="Client.html#event:PROJECT_OPENED">PROJECT_OPENED</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Fri Jun 21 2024 09:43:40 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>