UNPKG

node-red-contrib-motechat

Version:

ultranet topic and payload communication

52 lines (50 loc) 1.82 kB
<script type="text/x-red" data-template-name="cached-storage"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="sender"> </div> <div class="form-row display"> <label for="node-input-func"><i class="fa fa-wrench"></i> Func</label> <select type="text" id="node-input-func" style="display: inline-block; vertical-align: top;" > <option value="get" id="get-func" style="font-style: italic;">Get</option> <option value="set" id="set-func" style="font-style: italic;">Set</option> <option value="remove" id="remove-func" style="font-style: italic;">Remove</option> <option value="clear" id="clear-func" style="font-style: italic;">Clear</option> </select> </div> </script> <script type="text/javascript"> RED.nodes.registerType('cached-storage', { category: 'motebus-storage', color: '#25a2dd', defaults: { name: { value: 'Cached_Storage' }, func: { value: "set" }, }, inputs: 1, outputs: 2, icon: "db.png", label: function () { return this.name || "cached-storage"; } }); </script> <script type="text/x-red" data-help-name="cached-storage"> <p>Calls a Motebus cached methods based on the selected operator.</p> <br> <p>* Get *</p> <p>Queries a collection using the 'msg.payload' as the query statement .</p> <p>{ catalog, idname, datatype }</p> <br> <p>* Set *</p> <p>Creates or Update a obj (using the 'msg.payload').</p> <p>{ catalog, idname, data }</p> <br> <p>* Remove *</p> <p>Remove a obj (using the 'msg.payload').</p> <p>{ catalog, idname }</p> <br> <p>* Clear *</p> <p>Clear all catalog (using the 'msg.payload').</p> <p>{ catalog }</p> </script>