<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>ProcessorContext - Documentation</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="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ArchiveProcessor.html">ArchiveProcessor</a><ul class='methods'><li data-type='method'><a href="ArchiveProcessor.html#process">process</a></li></ul></li><li><a href="BackupProcessor.html">BackupProcessor</a><ul class='methods'><li data-type='method'><a href="BackupProcessor.html#process">process</a></li></ul></li><li><a href="DropboxArchive.html">DropboxArchive</a><ul class='methods'><li data-type='method'><a href="DropboxArchive.html#upload">upload</a></li></ul></li><li><a href="DropboxBackup.html">DropboxBackup</a><ul class='methods'><li data-type='method'><a href="DropboxBackup.html#run">run</a></li><li data-type='method'><a href="DropboxBackup.html#use">use</a></li></ul></li><li><a href="ProcessorContext.html">ProcessorContext</a><ul class='methods'><li data-type='method'><a href="ProcessorContext.html#error">error</a></li><li data-type='method'><a href="ProcessorContext.html#log">log</a></li></ul></li><li><a href="ResetProcessor.html">ResetProcessor</a><ul class='methods'><li data-type='method'><a href="ResetProcessor.html#process">process</a></li></ul></li><li><a href="TemporaryFolderProcessor.html">TemporaryFolderProcessor</a><ul class='methods'><li data-type='method'><a href="TemporaryFolderProcessor.html#process">process</a></li></ul></li><li><a href="UploadOnDemandProcessor.html">UploadOnDemandProcessor</a><ul class='methods'><li data-type='method'><a href="UploadOnDemandProcessor.html#process">process</a></li></ul></li><li><a href="UploadOnScheduleProcessor.html">UploadOnScheduleProcessor</a><ul class='methods'><li data-type='method'><a href="UploadOnScheduleProcessor.html#process">process</a></li></ul></li><li><a href="ZipArchiveProcessor.html">ZipArchiveProcessor</a><ul class='methods'><li data-type='method'><a href="ZipArchiveProcessor.html#process">process</a></li></ul></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-extending-with-modules.html">Extending with modules</a></li><li><a href="tutorial-getting-started.html">Getting started</a></li></ul> </nav> <div id="main"> <h1 class="page-title">ProcessorContext</h1> <section> <header> <h2> ProcessorContext </h2> </header> <article> <div class="container-overview"> <h4 class="name" id="ProcessorContext"><span class="type-signature"></span>new ProcessorContext<span class="signature">(name, credentials, cb<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> The context passing through the processors </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">The process name. This should be unique and with no special characters as it is used for the temp folder to hold the achive files.</td> </tr> <tr> <td class="name"><code>credentials</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> </td> <td class="description last">The dropbox credentials <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The dropbox application key</td> </tr> <tr> <td class="name"><code>secret</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The dropbox application secret</td> </tr> <tr> <td class="name"><code>token</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The dropbox application token</td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>cb</code></td> <td class="type"> <span class="param-type"><a href="ProcessorContext.html#~callback">ProcessorContext~callback</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">The onComplete callback function</td> </tr> </tbody> </table> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">The process name. This should be unique and with no special characters as it is used for the temp folder to hold the achive files</td> </tr> <tr> <td class="name"><code>date</code></td> <td class="type"> <span class="param-type">date</span> </td> <td class="attributes"> </td> <td class="description last">The date created, used in many cases for the archive name</td> </tr> <tr> <td class="name"><code>credentials</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> </td> <td class="description last">The dropbox credentials <h6>Properties</h6> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The dropbox application key</td> </tr> <tr> <td class="name"><code>secret</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The dropbox application secret</td> </tr> <tr> <td class="name"><code>token</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The dropbox application token</td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"><a href="ProcessorContext.html#~callback">ProcessorContext~callback</a></span> </td> <td class="attributes"> <optional><br> </td> <td class="description last">The onComplete callback function</td> </tr> </tbody> </table> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="error"><span class="type-signature"></span>error<span class="signature">(err)</span><span class="type-signature"></span></h4> <div class="description"> Log an error to console </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The error</td> </tr> </tbody> </table> <dl class="details"> </dl> <h4 class="name" id="log"><span class="type-signature"></span>log<span class="signature">(message)</span><span class="type-signature"></span></h4> <div class="description"> Log a message to console </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>message</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The message</td> </tr> </tbody> </table> <dl class="details"> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id="~callback"><span class="type-signature"></span>callback<span class="signature">(err)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type">Error</span> </td> <td class="description last">The error occured</td> </tr> </tbody> </table> <dl class="details"> </dl> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> using the Minami theme. </footer> <script>prettyPrint();</script> <script src="scripts/linenumber.js"></script> </body> </html>