Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
#! added doc posts
Browse files Browse the repository at this point in the history
  • Loading branch information
mjancarik committed Aug 31, 2018
1 parent b6b705c commit c4200a7
Show file tree
Hide file tree
Showing 81 changed files with 10,953 additions and 0 deletions.
134 changes: 134 additions & 0 deletions docs/_posts/2018-08-31-bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
category: "general"
title: "Bootstrap"
---

## Classes

<dl>
<dt><a href="#Bootstrap">Bootstrap</a></dt>
<dd><p>Application bootstrap used to initialize the environment and the application
itself.</p>
</dd>
</dl>

## Constants

<dl>
<dt><a href="#PRODUCTION_ENVIRONMENT">PRODUCTION_ENVIRONMENT</a> : <code>string</code></dt>
<dd><p>Environment name value in the production environment.</p>
</dd>
</dl>

## Bootstrap&nbsp;<a name="Bootstrap" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L20" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Application bootstrap used to initialize the environment and the application
itself.

**Kind**: global class

* [Bootstrap](#Bootstrap)
* [new Bootstrap(oc)](#new_Bootstrap_new)
* [._oc](#Bootstrap+_oc) : <code>ObjectContainer</code>
* [._config](#Bootstrap+_config) : <code>Object.&lt;string, \*&gt;</code>
* [.run(config)](#Bootstrap+run)
* [._initSettings()](#Bootstrap+_initSettings)
* [._getEnvironmentSetting()](#Bootstrap+_getEnvironmentSetting) ⇒ <code>Object.&lt;string, \*&gt;</code>
* [._bindDependencies()](#Bootstrap+_bindDependencies)
* [._initRoutes()](#Bootstrap+_initRoutes)
* [._initServices()](#Bootstrap+_initServices)


* * *

### new Bootstrap(oc)&nbsp;<a name="new_Bootstrap_new"></a>
Initializes the bootstrap.


| Param | Type | Description |
| --- | --- | --- |
| oc | <code>ObjectContainer</code> | The application's object container to use for managing dependencies. |


* * *

### bootstrap._oc : <code>ObjectContainer</code>&nbsp;<a name="Bootstrap+_oc" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L33" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
The object container used to manage dependencies.

**Kind**: instance property of [<code>Bootstrap</code>](#Bootstrap)

* * *

### bootstrap._config : <code>Object.&lt;string, \*&gt;</code>&nbsp;<a name="Bootstrap+_config" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L40" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Application configuration.

**Kind**: instance property of [<code>Bootstrap</code>](#Bootstrap)

* * *

### bootstrap.run(config)&nbsp;<a name="Bootstrap+run" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L56" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Initializes the application by running the bootstrap sequence. The
sequence initializes the components of the application in the following
order:
- application settings
- constants, service providers and class dependencies configuration
- services
- UI components
- routing

**Kind**: instance method of [<code>Bootstrap</code>](#Bootstrap)

| Param | Type | Description |
| --- | --- | --- |
| config | <code>Object.&lt;string, \*&gt;</code> | The application environment configuration for the current environment. |


* * *

### bootstrap._initSettings()&nbsp;<a name="Bootstrap+_initSettings" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L72" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Initializes the application settings. The method loads the settings for
all environments and then pics the settings for the current environment.

The method also handles using the values in the production environment
as default values for configuration items in other environments.

**Kind**: instance method of [<code>Bootstrap</code>](#Bootstrap)

* * *

### bootstrap._getEnvironmentSetting() ⇒ <code>Object.&lt;string, \*&gt;</code>&nbsp;<a name="Bootstrap+_getEnvironmentSetting" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L108" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Returns setting for current environment where base values are from production
environment and other environments override base values.

**Kind**: instance method of [<code>Bootstrap</code>](#Bootstrap)

* * *

### bootstrap._bindDependencies()&nbsp;<a name="Bootstrap+_bindDependencies" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L125" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Binds the constants, service providers and class dependencies to the
object container.

**Kind**: instance method of [<code>Bootstrap</code>](#Bootstrap)

* * *

### bootstrap._initRoutes()&nbsp;<a name="Bootstrap+_initRoutes" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L143" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Initializes the routes.

**Kind**: instance method of [<code>Bootstrap</code>](#Bootstrap)

* * *

### bootstrap._initServices()&nbsp;<a name="Bootstrap+_initServices" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L151" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Initializes the basic application services.

**Kind**: instance method of [<code>Bootstrap</code>](#Bootstrap)

* * *

## PRODUCTION_ENVIRONMENT : <code>string</code>&nbsp;<a name="PRODUCTION_ENVIRONMENT" href="https://github.com/seznam/IMA.js-core/tree/stable/Bootstrap.js#L14" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Environment name value in the production environment.

**Kind**: global constant

* * *

82 changes: 82 additions & 0 deletions docs/_posts/2018-08-31-cache-cache-entry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
category: "cache"
title: "CacheEntry"
---

## CacheEntry&nbsp;<a name="CacheEntry" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L5" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
The cache entry is a typed container of cache data used to track the
creation and expiration of cache entries.

**Kind**: global class

* [CacheEntry](#CacheEntry)
* [new CacheEntry(value, ttl)](#new_CacheEntry_new)
* [._value](#CacheEntry+_value) : <code>\*</code>
* [._ttl](#CacheEntry+_ttl) : <code>number</code>
* [._created](#CacheEntry+_created) : <code>number</code>
* [.isExpired()](#CacheEntry+isExpired) ⇒ <code>boolean</code>
* [.serialize()](#CacheEntry+serialize) ⇒ <code>Object</code>
* [.getValue()](#CacheEntry+getValue) ⇒ <code>\*</code>


* * *

### new CacheEntry(value, ttl)&nbsp;<a name="new_CacheEntry_new"></a>
Initializes the cache entry.


| Param | Type | Description |
| --- | --- | --- |
| value | <code>\*</code> | The cache entry value. |
| ttl | <code>number</code> | The time to live in milliseconds. |


* * *

### cacheEntry._value : <code>\*</code>&nbsp;<a name="CacheEntry+_value" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L18" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Cache entry value.

**Kind**: instance property of [<code>CacheEntry</code>](#CacheEntry)

* * *

### cacheEntry._ttl : <code>number</code>&nbsp;<a name="CacheEntry+_ttl" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L26" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
The time to live in milliseconds. The cache entry is considered
expired after this time.

**Kind**: instance property of [<code>CacheEntry</code>](#CacheEntry)

* * *

### cacheEntry._created : <code>number</code>&nbsp;<a name="CacheEntry+_created" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L33" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
The timestamp of creation of this cache entry.

**Kind**: instance property of [<code>CacheEntry</code>](#CacheEntry)

* * *

### cacheEntry.isExpired() ⇒ <code>boolean</code>&nbsp;<a name="CacheEntry+isExpired" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L41" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Returns `true` if this entry has expired.

**Kind**: instance method of [<code>CacheEntry</code>](#CacheEntry)
**Returns**: <code>boolean</code> - `true` if this entry has expired.

* * *

### cacheEntry.serialize() ⇒ <code>Object</code>&nbsp;<a name="CacheEntry+serialize" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L52" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Exports this cache entry into a JSON-serializable object.

**Kind**: instance method of [<code>CacheEntry</code>](#CacheEntry)
**Returns**: <code>Object</code> - This entry exported to a
JSON-serializable object.

* * *

### cacheEntry.getValue() ⇒ <code>\*</code>&nbsp;<a name="CacheEntry+getValue" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheEntry.js#L61" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Returns the entry value.

**Kind**: instance method of [<code>CacheEntry</code>](#CacheEntry)
**Returns**: <code>\*</code> - The entry value.

* * *

26 changes: 26 additions & 0 deletions docs/_posts/2018-08-31-cache-cache-factory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
category: "cache"
title: "CacheFactory"
---

## CacheFactory&nbsp;<a name="CacheFactory" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheFactory.js#L6" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Factory for creating instances of [CacheEntry](CacheEntry).

**Kind**: global class

* * *

### cacheFactory.createCacheEntry(value, [ttl]) ⇒ <code>CacheEntry</code>&nbsp;<a name="CacheFactory+createCacheEntry" href="https://github.com/seznam/IMA.js-core/tree/stable/cache/CacheFactory.js#L19" target="_blank"><span class="icon"><i class="fas fa-external-link-alt fa-xs"></i></span></a>
Create a new instance of [CacheEntry](CacheEntry) with value and ttl.

**Kind**: instance method of [<code>CacheFactory</code>](#CacheFactory)
**Returns**: <code>CacheEntry</code> - The created cache entry.

| Param | Type | Description |
| --- | --- | --- |
| value | <code>\*</code> | The cache entry value. |
| [ttl] | <code>number</code> | Cache entry time to live in milliseconds. The entry will expire after the specified amount of milliseconds. |


* * *

Loading

0 comments on commit c4200a7

Please sign in to comment.