Constant variables for clay
npm install clay-constantsclay-constants
==========
[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]
[bd_repo_url]: https://github.com/realglobe-Inc/clay-constants
[bd_travis_url]: http://travis-ci.org/realglobe-Inc/clay-constants
[bd_travis_shield_url]: http://img.shields.io/travis/realglobe-Inc/clay-constants.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/realglobe-Inc/clay-constants
[bd_travis_com_shield_url]: https://api.travis-ci.com/realglobe-Inc/clay-constants.svg?token=
[bd_license_url]: https://github.com/realglobe-Inc/clay-constants/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/realglobe-Inc/clay-constants
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/realglobe-Inc/clay-constants.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/realglobe-Inc/clay-constants.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/realglobe-Inc/clay-constants
[bd_gemnasium_shield_url]: https://gemnasium.com/realglobe-Inc/clay-constants.svg
[bd_npm_url]: http://www.npmjs.org/package/clay-constants
[bd_npm_shield_url]: http://img.shields.io/npm/v/clay-constants.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
Constant variables for clay
Installation
-----
``bash`
$ npm install clay-constants --save
Usage
---------
`javascript
'use strict'
const { LogPrefixes } = require('clay-constants')
{
const { CRYPTO_PREFIX } = LogPrefixes
console.log(${CRYPTO_PREFIX} put some logs...)`
/ ... /
}
Values
------
+ CryptFormat
+ DataTypes
+ DateFormats
+ DriverSpec
+ EntitySpec
+ IdSpec
+ LogPrefixes
+ LumpSpec
+ ReservedResources
+ ResourceEvents
+ ResourceSpec
| Key | Value |
| --- | ---- |
| DIGEST_ALGORITHM | sha256 |512
| GENERATE_BITS | |hex
| SIGN_FORMAT | |
| Key | Value |
| --- | ---- |
| NUMBER | cly:number |cly:string
| STRING | |cly:boolean
| BOOLEAN | |cly:date
| DATE | |cly:object
| OBJECT | |cly:null
| NULL | |cly:ref
| REF | |cly:entity
| ENTITY | |cly:id
| ID | |
| Key | Value |
| --- | ---- |
| DUMP_FILENAME_FORMAT | |
| Key | Value |
| --- | ---- |
| REQUIRED_METHODS | one,list,create,update,destroy,drop,resources |one,list,create,update,destroy,drop,oneBulk,listBulk,createBulk,updateBulk,destroyBulk,cursor
| RESOURCE_BINDABLE_METHODS | |
| Key | Value |
| --- | ---- |
| RESERVED_ATTRIBUTES | id,$$at,$$seal,$$by,$$policy,$$as,$$num |toString,toJSON,get,set,sync,update,save,destroy
| RESERVED_METHODS | |
| Key | Value |
| --- | ---- |
| ID_PATTERN | /^[a-z0-9\-]+$/ |/^[a-z0-9\-]+$/
| SCOPE_PATTERN | |
| Key | Value |
| --- | ---- |
| LUMP_PREFIX | [clay-lump] |[clay-driver]
| DRIVER_PREFIX | |[clay-crypt]
| CRYPTO_PREFIX | |[clay-id]
| ID_PREFIX | |[clay-entity]
| ENTITY_PREFIX | |[clay-resource]
| RESOURCE_PREFIX | |[clay-policy]
| POLICY_PREFIX | |
| Key | Value |
| --- | ---- |
| NAME_PATTERN | /^[A-Za-z][A-Za-za-z0-9\-_\.\/]*$/ |
| Key | Value |
| --- | ---- |
| POLICY | CLYPolicy |CLYSignature
| SIGNATURE | |CLYTrace
| TRACE | |CLYLocal
| LOCAL | |CLYIndices
| INDICES | |CLYRelation
| RELATION | |
| Key | Value |
| --- | ---- |
| REF_ADD | cly:ref:add |cly:ref:remove
| REF_REMOVE | |cly:annotate:toggle
| ANNOTATION_TOGGLE | |cly:policy:set
| POLICY_SET | |cly:policy:remove
| POLICY_REMOVE | |cly:resource:sub
| RESOURCE_SUB | |cly:invalidate
| INVALIDATE | |cly:invalidate:bulk
| INVALIDATE_BULK | |cly:entity:create
| ENTITY_CREATE | |cly:entity:create:bulk
| ENTITY_CREATE_BULK | |cly:entity:update
| ENTITY_UPDATE | |cly:entity:update:bulk
| ENTITY_UPDATE_BULK | |cly:entity:destroy
| ENTITY_DESTROY | |cly:entity:destroy:bulk
| ENTITY_DESTROY_BULK | |cly:entity:drop
| ENTITY_DROP | |cly:entity:drop:bulk
| ENTITY_DROP_BULK | |
| Key | Value |
| --- | ---- |
| NAME_PATTERN | /^[A-Za-z][A-Za-za-z0-9\/#\-_\.]*$/ |/^[A-Za-z][A-Za-za-z0-9\/#\-_\.]*$/` |
| DOMAIN_PATTERN |
License
-------
This software is released under the Apache-2.0 License.
Links
------
+ [ClayDB][clay_d_b_url]
+ [Realglobe, Inc.][realglobe,_inc__url]
[clay_d_b_url]: https://github.com/realglobe-Inc/claydb
[realglobe,_inc__url]: http://realglobe.jp