docs/Config.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Config - yocto-config</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/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">
<link type="text/css" rel="stylesheet" href="styles/custom.css"/>
<link type="text/css" rel="stylesheet" href="styles/tomorrow-night.min.css"/>
<script type="text/javascript" src="scripts/lodash.min.js"></script>
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/search.js"></script>
</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>
<a href="http://www.yocto.re" target="_blank"><img class="logo" src="./extras/logo-yocto.png" alt="logo-yocto"/></a>
<h2><a href="index.html">Home</a><span class="version">v2.0.5</span></h2><input class="search" placeholder="Type your search here ...." /><h3>Classes</h3><ul><li><a href="Config.html">Config</a><ul class='methods'><li data-type='method'><a href="Config.html#addCustomSchema">addCustomSchema</a></li><li data-type='method'><a href="Config.html#autoEnableValidators">autoEnableValidators</a></li><li data-type='method'><a href="Config.html#enableExpress">enableExpress</a></li><li data-type='method'><a href="Config.html#enableMongoose">enableMongoose</a></li><li data-type='method'><a href="Config.html#enablePassportJs">enablePassportJs</a></li><li data-type='method'><a href="Config.html#enableRender">enableRender</a></li><li data-type='method'><a href="Config.html#enableRouter">enableRouter</a></li><li data-type='method'><a href="Config.html#enableSchema">enableSchema</a></li><li data-type='method'><a href="Config.html#find">find</a></li><li data-type='method'><a href="Config.html#get">get</a></li><li data-type='method'><a href="Config.html#getConfig">getConfig</a></li><li data-type='method'><a href="Config.html#load">load</a></li><li data-type='method'><a href="Config.html#loadPassport">loadPassport</a></li><li data-type='method'><a href="Config.html#reload">reload</a></li><li data-type='method'><a href="Config.html#set">set</a></li><li data-type='method'><a href="Config.html#setConfigPath">setConfigPath</a></li></ul></li><li><a href="Schema.html">Schema</a><ul class='methods'><li data-type='method'><a href="Schema.html#getExpress">getExpress</a></li><li data-type='method'><a href="Schema.html#getMongoose">getMongoose</a></li><li data-type='method'><a href="Schema.html#getPassportJs">getPassportJs</a></li><li data-type='method'><a href="Schema.html#getRender">getRender</a></li><li data-type='method'><a href="Schema.html#getRouter">getRouter</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">Config</h1>
<section>
<header>
<h2>
Config
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Config"><span class="type-signature"></span>new Config<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
<p>Yocto config manager.
Manage your configuration file (all / common / env & specific file)</p>
<p>Config file has priority. And priority is defined like a php ini system.
<code>(Other file).json</code> < <code>all.json</code> < <code>common.json</code> < <code>development.json</code> < <code>stagging.json</code> < <code>production.json</code></p>
<p>All specific data must be configured on a each correct file.</p>
<p>all.json : contains general data
common.json : must contains all common data between each env
development.json : must contains development data for development environnement
staging.json : must contains stagging data for staging environnement
production.json : must contains production data for production environnement</p>
<p>This Module use some security format rules based on Lusca NPM module : <a href="https://www.npmjs.com/package/lusca">https://www.npmjs.com/package/lusca</a></p>
<ul>
<li>Cross Site Request Forgery (CSRF) headers : <a href="https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)">https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)</a></li>
<li>Content Security Policy (CSP) headers : <a href="https://www.owasp.org/index.php/Content_Security_Policy">https://www.owasp.org/index.php/Content_Security_Policy</a></li>
<li>MDN CSP usage : <a href="https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Using_Content_Security_Policy">https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Using_Content_Security_Policy</a></li>
<li>X-FRAME-OPTIONS : <a href="https://www.owasp.org/index.php/Clickjacking">https://www.owasp.org/index.php/Clickjacking</a></li>
<li>Platform for Privacy Preferences Project (P3P) headers : <a href="http://support.microsoft.com/kb/290333">http://support.microsoft.com/kb/290333</a></li>
<li>HTTP Strict Transport Security (HSTS & Chrome HSTS preload) : <a href="https://www.owasp.org/index.php/HTTP_Strict_Transport_Security">https://www.owasp.org/index.php/HTTP_Strict_Transport_Security</a> & <a href="https://hstspreload.appspot.com/">https://hstspreload.appspot.com/</a></li>
<li>XssProtection : <a href="http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx">http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx</a></li>
</ul>
</div>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li><a href="mailto:mathieu@yocto.re">: ROBERT Mathieu</a></li>
</ul>
</dd>
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li>: Yocto SAS, All right reserved</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line13">line 13</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".base"><span class="type-signature">(static) </span>base<span class="type-signature"> :String</span></h4>
<div class="description">
<p>Default base path</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">String</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line73">line 73</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".config"><span class="type-signature">(static) </span>config<span class="type-signature"> :Object</span></h4>
<div class="description">
<p>Default config value</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>{}</li>
</ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line43">line 43</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".env"><span class="type-signature">(static) </span>env<span class="type-signature"> :String</span></h4>
<div class="description">
<p>Default env value</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">String</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>development</li>
</ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line63">line 63</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".logger"><span class="type-signature">(static) </span>logger<span class="type-signature"> :Instance</span></h4>
<div class="description">
<p>Default logger instance. can be override by set function</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Instance</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line82">line 82</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".prefix"><span class="type-signature">(static) </span>prefix<span class="type-signature"> :String</span></h4>
<div class="description">
<p>Prefix to use in case of multiple configuration</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">String</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line91">line 91</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".schema"><span class="type-signature">(static) </span>schema<span class="type-signature"> :Object</span></h4>
<div class="description">
<p>Default schema validation for config validator</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>{
express : schema.getExpress(),
mongoose : schema.getMongoose(),
passportJs : schema.getPassportJs(),
render : schema.getRender(),
router : schema.getRouter()
}</li>
</ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line100">line 100</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".state"><span class="type-signature">(static) </span>state<span class="type-signature"> :Boolean</span></h4>
<div class="description">
<p>Default state value, true if config state is or false otherwise</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>false</li>
</ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line53">line 53</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".this.schema"><span class="type-signature">(static) </span>this.schema<span class="type-signature"></span></h4>
<div class="description">
<p>Current schema to use for validation</p>
</div>
<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>schema</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>{}</li>
</ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line131">line 131</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addCustomSchema"><span class="type-signature"></span>addCustomSchema<span class="signature">(name, value, enable, complete)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Add a custom schema on config</p>
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>config name to add in schema</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>config value to add in schema</p></td>
</tr>
<tr>
<td class="name"><code>enable</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to add auto enable of config</p></td>
</tr>
<tr>
<td class="name"><code>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to add new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line264">line 264</a>
</li></ul></dd>
</dl>
<h4 class="name" id="autoEnableValidators"><span class="type-signature"></span>autoEnableValidators<span class="signature">(items)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Auto enable validators schema for given list</p>
</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>items</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last"><p>array of items to enable</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line387">line 387</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok false otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="enableExpress"><span class="type-signature"></span>enableExpress<span class="signature">(complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Enable Express config</p>
</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>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to append new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line193">line 193</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="enableMongoose"><span class="type-signature"></span>enableMongoose<span class="signature">(complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Enable Mongoose config</p>
</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>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to append new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line226">line 226</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="enablePassportJs"><span class="type-signature"></span>enablePassportJs<span class="signature">(complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Enable PassportJs config</p>
</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>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to append new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line237">line 237</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="enableRender"><span class="type-signature"></span>enableRender<span class="signature">(complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Enable Yocto Render config</p>
</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>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to append new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line204">line 204</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="enableRouter"><span class="type-signature"></span>enableRouter<span class="signature">(complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Enable Yocto Router config</p>
</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>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to append new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line215">line 215</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="enableSchema"><span class="type-signature"></span>enableSchema<span class="signature">(name, complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Enable Specific schema config</p>
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>default name to find in schema</p></td>
</tr>
<tr>
<td class="name"><code>complete</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last"><p>true if we need to add new config after existing</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line249">line 249</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(name, complete)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Default find function, retreive a config from given name</p>
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>wanted config</p></td>
</tr>
<tr>
<td class="name"><code>complete</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>true if we need to complete existing config with new</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line141">line 141</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok falser otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(name)</span><span class="type-signature"> → {Mixed}</span></h4>
<div class="description">
<p>Return correct property from given name</p>
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>the property name</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line347">line 347</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>needed data</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Mixed</span>
</dd>
</dl>
<h4 class="name" id="getConfig"><span class="type-signature"></span>getConfig<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
<div class="description">
<p>Retreive default configuration</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line325">line 325</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>loaded object</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
<div class="description">
<p>Default load function, load data from all.js constant file</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line423">line 423</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>return current promise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="loadPassport"><span class="type-signature"></span>loadPassport<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
<div class="description">
<p>Load password schema for current configuration</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line374">line 374</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>return current promise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="reload"><span class="type-signature"></span>reload<span class="signature">(base)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Reload config from path</p>
</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>base</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>if base exists and is valid reassign base and reload</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line358">line 358</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if load succeed false otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(name, value)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Default set function, a value to a specific params</p>
</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>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>current name to use</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>current value to assign on params name</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line294">line 294</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok false otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id="setConfigPath"><span class="type-signature"></span>setConfigPath<span class="signature">(path)</span><span class="type-signature"> → {Boolean}</span></h4>
<div class="description">
<p>Set config path</p>
</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>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>default path to use</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line336">line 336</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if all is ok false otherwise</p>
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<br class="clear">
<footer>Documentation for application <b>yocto-config<b> was generated at Thu Jun 29 2017 12:04:57 GMT+0400 (RET) with <a href='https://www.npmjs.com/package/yoctodoc'>yocto-doc</a> module - Copyright Yocto © 2017</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>