build: add tsc type checks and emit declarations in the ci/test pipeline (#155)
This commit introduces TypeScript checks and generates type declarations for the existing JavaScript codebase using `tsc` prior to running the linter task. Ref: https://github.com/cloudevents/sdk-javascript/issues/9 Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
parent
6f0b5ea5f1
commit
2c469efaf5
|
@ -5,6 +5,9 @@ npm-debug.log*
|
|||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Generated typedefs
|
||||
*.d.ts
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -285,7 +285,7 @@ events can come as either binary or structured, use {HTTPReceiver}.</p>
|
|||
</svg>
|
||||
</a>
|
||||
<h4 class="name" id="check">
|
||||
<span class="type-signature"></span>check<span class="signature">(payload, headers)</span><span class="type-signature"> → {void}</span>
|
||||
<span class="type-signature"></span>check<span class="signature">(payload, headers)</span><span class="type-signature"> → {boolean}</span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
|
@ -422,7 +422,7 @@ Cloud Event specification for this receiver.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_receiver_binary.js.html">bindings/http/receiver_binary.js</a>, <a href="bindings_http_receiver_binary.js.html#line36">line 36</a>
|
||||
<a href="bindings_http_receiver_binary.js.html">bindings/http/receiver_binary.js</a>, <a href="bindings_http_receiver_binary.js.html#line35">line 35</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -629,7 +629,7 @@ instance if it conforms to the Cloud Event specification for this receiver.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_receiver_binary.js.html">bindings/http/receiver_binary.js</a>, <a href="bindings_http_receiver_binary.js.html#line49">line 49</a>
|
||||
<a href="bindings_http_receiver_binary.js.html">bindings/http/receiver_binary.js</a>, <a href="bindings_http_receiver_binary.js.html#line48">line 48</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -470,7 +470,7 @@
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line214">line 214</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line216">line 216</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -627,7 +627,7 @@
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line193">line 193</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line195">line 195</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -784,7 +784,7 @@
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line173">line 173</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line175">line 175</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -888,7 +888,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line35">line 35</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line37">line 37</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -979,7 +979,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line203">line 203</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line205">line 205</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1081,7 +1081,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line183">line 183</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line185">line 185</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1183,7 +1183,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line229">line 229</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line231">line 231</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1285,7 +1285,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line25">line 25</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line27">line 27</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1376,7 +1376,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line128">line 128</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line130">line 130</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1467,7 +1467,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line109">line 109</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line111">line 111</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1569,7 +1569,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line89">line 89</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line91">line 91</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1671,7 +1671,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line150">line 150</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line152">line 152</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1773,7 +1773,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line71">line 71</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line73">line 73</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -1930,7 +1930,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line119">line 119</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line121">line 121</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -2029,7 +2029,7 @@ it's invalid.</p>
|
|||
|
||||
|
||||
<span class="param-type">
|
||||
URI
|
||||
string
|
||||
</span>
|
||||
|
||||
|
||||
|
@ -2043,7 +2043,7 @@ it's invalid.</p>
|
|||
|
||||
|
||||
<td class="description last">
|
||||
<p>the context in which the event happened</p>
|
||||
<p>the context in which the event happened in URI form</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -2087,7 +2087,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line99">line 99</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line101">line 101</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -2244,7 +2244,7 @@ it's invalid.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line138">line 138</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line140">line 140</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -2347,7 +2347,7 @@ is performed.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line51">line 51</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line53">line 53</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -2493,7 +2493,7 @@ is performed.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line61">line 61</a>
|
||||
<a href="cloudevent.js.html">cloudevent.js</a>, <a href="cloudevent.js.html#line63">line 63</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
30
docs/Gemfile
30
docs/Gemfile
|
@ -1,30 +0,0 @@
|
|||
source "https://rubygems.org"
|
||||
# Hello! This is where you manage which Jekyll version is used to run.
|
||||
# When you want to use a different version, change it below, save the
|
||||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
||||
#
|
||||
# bundle exec jekyll serve
|
||||
#
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
|
||||
gem "jekyll", "~> 3.8.5"
|
||||
gem "github-pages", group: :jekyll_plugins
|
||||
|
||||
gem "just-the-docs"
|
||||
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.12"
|
||||
end
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
# and associated library.
|
||||
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
|
||||
gem "tzinfo", "~> 1.2"
|
||||
gem "tzinfo-data"
|
||||
end
|
||||
|
||||
# Performance-booster for watching directories on Windows
|
||||
gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?
|
||||
|
|
@ -1,263 +0,0 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (6.0.2.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
zeitwerk (~> 2.2)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.11.1)
|
||||
colorator (1.1.0)
|
||||
commonmarker (0.17.13)
|
||||
ruby-enum (~> 0.5)
|
||||
concurrent-ruby (1.1.6)
|
||||
dnsruby (1.61.3)
|
||||
addressable (~> 2.5)
|
||||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
ethon (0.12.0)
|
||||
ffi (>= 1.3.0)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
faraday (1.0.1)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.12.2)
|
||||
forwardable-extended (2.6.0)
|
||||
gemoji (3.0.1)
|
||||
github-pages (204)
|
||||
github-pages-health-check (= 1.16.1)
|
||||
jekyll (= 3.8.5)
|
||||
jekyll-avatar (= 0.7.0)
|
||||
jekyll-coffeescript (= 1.1.1)
|
||||
jekyll-commonmark-ghpages (= 0.1.6)
|
||||
jekyll-default-layout (= 0.1.4)
|
||||
jekyll-feed (= 0.13.0)
|
||||
jekyll-gist (= 1.5.0)
|
||||
jekyll-github-metadata (= 2.13.0)
|
||||
jekyll-mentions (= 1.5.1)
|
||||
jekyll-optional-front-matter (= 0.3.2)
|
||||
jekyll-paginate (= 1.1.0)
|
||||
jekyll-readme-index (= 0.3.0)
|
||||
jekyll-redirect-from (= 0.15.0)
|
||||
jekyll-relative-links (= 0.6.1)
|
||||
jekyll-remote-theme (= 0.4.1)
|
||||
jekyll-sass-converter (= 1.5.2)
|
||||
jekyll-seo-tag (= 2.6.1)
|
||||
jekyll-sitemap (= 1.4.0)
|
||||
jekyll-swiss (= 1.0.0)
|
||||
jekyll-theme-architect (= 0.1.1)
|
||||
jekyll-theme-cayman (= 0.1.1)
|
||||
jekyll-theme-dinky (= 0.1.1)
|
||||
jekyll-theme-hacker (= 0.1.1)
|
||||
jekyll-theme-leap-day (= 0.1.1)
|
||||
jekyll-theme-merlot (= 0.1.1)
|
||||
jekyll-theme-midnight (= 0.1.1)
|
||||
jekyll-theme-minimal (= 0.1.1)
|
||||
jekyll-theme-modernist (= 0.1.1)
|
||||
jekyll-theme-primer (= 0.5.4)
|
||||
jekyll-theme-slate (= 0.1.1)
|
||||
jekyll-theme-tactile (= 0.1.1)
|
||||
jekyll-theme-time-machine (= 0.1.1)
|
||||
jekyll-titles-from-headings (= 0.5.3)
|
||||
jemoji (= 0.11.1)
|
||||
kramdown (= 1.17.0)
|
||||
liquid (= 4.0.3)
|
||||
mercenary (~> 0.3)
|
||||
minima (= 2.5.1)
|
||||
nokogiri (>= 1.10.4, < 2.0)
|
||||
rouge (= 3.13.0)
|
||||
terminal-table (~> 1.4)
|
||||
github-pages-health-check (1.16.1)
|
||||
addressable (~> 2.3)
|
||||
dnsruby (~> 1.60)
|
||||
octokit (~> 4.0)
|
||||
public_suffix (~> 3.0)
|
||||
typhoeus (~> 1.3)
|
||||
html-pipeline (2.12.3)
|
||||
activesupport (>= 2)
|
||||
nokogiri (>= 1.4)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (3.8.5)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 0.7)
|
||||
jekyll-sass-converter (~> 1.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 1.14)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.3.3)
|
||||
pathutil (~> 0.9)
|
||||
rouge (>= 1.7, < 4)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-avatar (0.7.0)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-coffeescript (1.1.1)
|
||||
coffee-script (~> 2.2)
|
||||
coffee-script-source (~> 1.11.1)
|
||||
jekyll-commonmark (1.3.1)
|
||||
commonmarker (~> 0.14)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-commonmark-ghpages (0.1.6)
|
||||
commonmarker (~> 0.17.6)
|
||||
jekyll-commonmark (~> 1.2)
|
||||
rouge (>= 2.0, < 4.0)
|
||||
jekyll-default-layout (0.1.4)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-feed (0.13.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-gist (1.5.0)
|
||||
octokit (~> 4.2)
|
||||
jekyll-github-metadata (2.13.0)
|
||||
jekyll (>= 3.4, < 5.0)
|
||||
octokit (~> 4.0, != 4.4.0)
|
||||
jekyll-mentions (1.5.1)
|
||||
html-pipeline (~> 2.3)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-optional-front-matter (0.3.2)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-readme-index (0.3.0)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-redirect-from (0.15.0)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-relative-links (0.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-remote-theme (0.4.1)
|
||||
addressable (~> 2.0)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
rubyzip (>= 1.3.0)
|
||||
jekyll-sass-converter (1.5.2)
|
||||
sass (~> 3.4)
|
||||
jekyll-seo-tag (2.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-swiss (1.0.0)
|
||||
jekyll-theme-architect (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-cayman (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-dinky (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-hacker (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-leap-day (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-merlot (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-midnight (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-minimal (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-modernist (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-primer (0.5.4)
|
||||
jekyll (> 3.5, < 5.0)
|
||||
jekyll-github-metadata (~> 2.9)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-slate (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-tactile (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-time-machine (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-titles-from-headings (0.5.3)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
jemoji (0.11.1)
|
||||
gemoji (~> 3.0)
|
||||
html-pipeline (~> 2.2)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
just-the-docs (0.2.8)
|
||||
bundler (~> 2.1.4)
|
||||
jekyll (>= 3.8.5, < 4.1.0)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
rake (>= 12.3.1, < 13.1.0)
|
||||
kramdown (1.17.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.2.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.4.0)
|
||||
minima (2.5.1)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.14.0)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
octokit (4.18.0)
|
||||
faraday (>= 0.9)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (3.1.1)
|
||||
rake (13.0.1)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rouge (3.13.0)
|
||||
ruby-enum (0.8.0)
|
||||
i18n
|
||||
rubyzip (2.3.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.7.4)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sawyer (0.8.2)
|
||||
addressable (>= 2.3.5)
|
||||
faraday (> 0.8, < 2.0)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (1.3.1)
|
||||
ethon (>= 0.9.0)
|
||||
tzinfo (1.2.7)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo-data (1.2020.1)
|
||||
tzinfo (>= 1.0.0)
|
||||
unicode-display_width (1.7.0)
|
||||
wdm (0.1.1)
|
||||
zeitwerk (2.3.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
github-pages
|
||||
jekyll (~> 3.8.5)
|
||||
jekyll-feed (~> 0.12)
|
||||
just-the-docs
|
||||
tzinfo (~> 1.2)
|
||||
tzinfo-data
|
||||
wdm (~> 0.1.1)
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -344,7 +344,7 @@ protocol specification in binary mode.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_http_emitter.js.html">bindings/http/http_emitter.js</a>, <a href="bindings_http_http_emitter.js.html#line26">line 26</a>
|
||||
<a href="bindings_http_http_emitter.js.html">bindings/http/http_emitter.js</a>, <a href="bindings_http_http_emitter.js.html#line28">line 28</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -556,7 +556,7 @@ and that is "ce-id", corresponding to the event ID.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_http_emitter.js.html">bindings/http/http_emitter.js</a>, <a href="bindings_http_http_emitter.js.html#line72">line 72</a>
|
||||
<a href="bindings_http_http_emitter.js.html">bindings/http/http_emitter.js</a>, <a href="bindings_http_http_emitter.js.html#line77">line 77</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -863,7 +863,7 @@ Possible values are "binary" and "structured". Default: stru
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_http_emitter.js.html">bindings/http/http_emitter.js</a>, <a href="bindings_http_http_emitter.js.html#line54">line 54</a>
|
||||
<a href="bindings_http_http_emitter.js.html">bindings/http/http_emitter.js</a>, <a href="bindings_http_http_emitter.js.html#line56">line 56</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -171,7 +171,7 @@
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_http_receiver.js.html">bindings/http/http_receiver.js</a>, <a href="bindings_http_http_receiver.js.html#line26">line 26</a>
|
||||
<a href="bindings_http_http_receiver.js.html">bindings/http/http_receiver.js</a>, <a href="bindings_http_http_receiver.js.html#line28">line 28</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -371,7 +371,7 @@ binary and structured incoming CloudEvents.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_http_receiver.js.html">bindings/http/http_receiver.js</a>, <a href="bindings_http_http_receiver.js.html#line47">line 47</a>
|
||||
<a href="bindings_http_http_receiver.js.html">bindings/http/http_receiver.js</a>, <a href="bindings_http_http_receiver.js.html#line49">line 49</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -167,7 +167,7 @@
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_emitter_structured.js.html">bindings/http/emitter_structured.js</a>, <a href="bindings_http_emitter_structured.js.html#line19">line 19</a>
|
||||
<a href="bindings_http_emitter_structured.js.html">bindings/http/emitter_structured.js</a>, <a href="bindings_http_emitter_structured.js.html#line22">line 22</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
@ -417,7 +417,7 @@ https://nodejs.org/api/http.html#http_http_request_options_callback</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_emitter_structured.js.html">bindings/http/emitter_structured.js</a>, <a href="bindings_http_emitter_structured.js.html#line31">line 31</a>
|
||||
<a href="bindings_http_emitter_structured.js.html">bindings/http/emitter_structured.js</a>, <a href="bindings_http_emitter_structured.js.html#line34">line 34</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
|
@ -0,0 +1,725 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>
|
||||
StructuredHTTPReceiver - Documentation
|
||||
</title>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||
|
||||
<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/collapse.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<svg style="display: none;">
|
||||
<defs>
|
||||
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="top-nav-wrapper">
|
||||
<ul>
|
||||
<li >
|
||||
<a href="index.html">
|
||||
|
||||
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h3 class="reference-title">
|
||||
cloudevents-sdk
|
||||
</h3>
|
||||
|
||||
|
||||
<h3>
|
||||
Resources
|
||||
</h3>
|
||||
|
||||
<a href="concepts.html">Concepts</a>
|
||||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">
|
||||
StructuredHTTPReceiver
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<header>
|
||||
|
||||
<h2>
|
||||
|
||||
StructuredHTTPReceiver
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<div class="class-description">
|
||||
<p>A utility class used to receive structured CloudEvents
|
||||
over HTTP.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Constructor</h2>
|
||||
|
||||
|
||||
<span class='name-container'>
|
||||
<a class="link-icon" href="#StructuredHTTPReceiver">
|
||||
<svg height="20" width="20" style="fill: black;">
|
||||
<use xlink:href="#linkIcon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<h4 class="name" id="StructuredHTTPReceiver">
|
||||
<span class="type-signature"></span>new StructuredHTTPReceiver<span class="signature">(version)</span><span class="type-signature"></span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Creates a new StructuredHTTPReceiver. Supports Cloud Events specification
|
||||
versions 0.3 and 1.0 (default).</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>version</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">
|
||||
string
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">
|
||||
<p>the Cloud Events specification version. Default: 1.0.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_receiver_structured.js.html">bindings/http/receiver_structured.js</a>, <a href="bindings_http_receiver_structured.js.html#line19">line 19</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-see">See:</dt>
|
||||
<dd class="tag-see">
|
||||
<ul>
|
||||
|
||||
<li>
|
||||
{StructuredReceiver}
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Methods</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class='name-container'>
|
||||
<a class="link-icon" href="#check">
|
||||
<svg height="20" width="20" style="fill: black;">
|
||||
<use xlink:href="#linkIcon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<h4 class="name" id="check">
|
||||
<span class="type-signature"></span>check<span class="signature">(payload, headers)</span><span class="type-signature"> → {boolean}</span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Checks whether the provided payload and headers conform to the Cloud Events
|
||||
specification version supported by this instance.</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>payload</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">
|
||||
object
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">
|
||||
<p>the cloud event data payload</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>headers</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">
|
||||
object
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">
|
||||
<p>the HTTP headers received for this cloud event</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_receiver_structured.js.html">bindings/http/receiver_structured.js</a>, <a href="bindings_http_receiver_structured.js.html#line36">line 36</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Throws:</h5>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<div class="param-desc">
|
||||
<p>if the payload and header combination do not conform to the spec</p>
|
||||
</div>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
<dl>
|
||||
<dt>Type</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">
|
||||
<a href="ValidationError.html">ValidationError</a>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class='name-container'>
|
||||
<a class="link-icon" href="#parse">
|
||||
<svg height="20" width="20" style="fill: black;">
|
||||
<use xlink:href="#linkIcon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<h4 class="name" id="parse">
|
||||
<span class="type-signature"></span>parse<span class="signature">(payload, headers)</span><span class="type-signature"> → {<a href="CloudEvent.html">CloudEvent</a>}</span>
|
||||
</h4>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Creates a new CloudEvent instance based on the provided payload and headers.</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>payload</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">
|
||||
object
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">
|
||||
<p>the cloud event data payload</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>headers</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">
|
||||
object
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">
|
||||
<p>the HTTP headers received for this cloud event</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_receiver_structured.js.html">bindings/http/receiver_structured.js</a>, <a href="bindings_http_receiver_structured.js.html#line48">line 48</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Throws:</h5>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<div class="param-desc">
|
||||
<p>if the payload and header combination do not conform to the spec</p>
|
||||
</div>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
<dt>
|
||||
<dl>
|
||||
<dt>Type</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">
|
||||
<a href="ValidationError.html">ValidationError</a>
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a>
|
||||
</footer>
|
||||
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/pagelocation.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -283,7 +283,7 @@ and array of additional errors.</p>
|
|||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_validation_validation_error.js.html">bindings/http/validation/validation_error.js</a>, <a href="bindings_http_validation_validation_error.js.html#line12">line 12</a>
|
||||
<a href="bindings_http_validation_validation_error.js.html">bindings/http/validation/validation_error.js</a>, <a href="bindings_http_validation_validation_error.js.html#line17">line 17</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -90,7 +90,7 @@
|
|||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>const axios = require("axios");
|
||||
<pre class="prettyprint source linenums"><code>const { default: Axios } = require("axios");
|
||||
const EmitterV1 = require("./v1").BinaryEmitter;
|
||||
const EmitterV3 = require("./v03").BinaryEmitter;
|
||||
|
||||
|
@ -169,10 +169,11 @@ class BinaryHTTPEmitter {
|
|||
});
|
||||
|
||||
config[DATA_ATTRIBUTE] = data;
|
||||
config.headers = headers;
|
||||
config[HEADERS] = headers;
|
||||
|
||||
// Return the Promise
|
||||
return axios.request(config);
|
||||
// @ts-ignore Types of property 'url' are incompatible. Type 'URL' is not assignable to type 'string'.
|
||||
return Axios.request(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -90,7 +90,10 @@
|
|||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>const axios = require("axios");
|
||||
<pre class="prettyprint source linenums"><code>const { default: Axios } = require("axios");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
const {
|
||||
DATA_ATTRIBUTE,
|
||||
DEFAULT_CE_CONTENT_TYPE,
|
||||
|
@ -123,7 +126,8 @@ class StructuredHTTPEmitter {
|
|||
async emit(options, cloudevent) {
|
||||
const config = { ...defaults, ...options };
|
||||
config[DATA_ATTRIBUTE] = cloudevent.format();
|
||||
return axios.request(config);
|
||||
// @ts-ignore Types of property 'url' are incompatible. Type 'URL' is not assignable to type 'string'.
|
||||
return Axios.request(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -93,6 +93,8 @@
|
|||
<pre class="prettyprint source linenums"><code>const BinaryHTTPEmitter = require("./emitter_binary.js");
|
||||
const StructuredEmitter = require("./emitter_structured.js");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
const {
|
||||
SPEC_V03,
|
||||
SPEC_V1
|
||||
|
@ -115,7 +117,7 @@ class HTTPEmitter {
|
|||
* @param {string} [options.version] The HTTP binding specification version. Default: "1.0"
|
||||
* @throws {TypeError} if no options.url is provided or an unknown specification version is provided.
|
||||
*/
|
||||
constructor({ url, version = SPEC_V1 } = {}) {
|
||||
constructor({ url, version = SPEC_V1 } = { url: undefined }) {
|
||||
if (version !== SPEC_V03 && version !== SPEC_V1) {
|
||||
throw new TypeError(
|
||||
`Unknown CloudEvent specification version: ${version}`);
|
||||
|
@ -143,12 +145,15 @@ class HTTPEmitter {
|
|||
* Possible values are "binary" and "structured". Default: structured
|
||||
* @returns {Promise} Promise with an eventual response from the receiver
|
||||
*/
|
||||
send(event, { url, mode = "binary", ...httpOpts } = {}) {
|
||||
send(event, { url, mode = "binary", ...httpOpts } = { url: undefined }) {
|
||||
if (!url) { url = this.url; }
|
||||
// @ts-ignore Property 'url' does not exist on type '{}'
|
||||
httpOpts.url = url;
|
||||
if (mode === "binary") {
|
||||
// @ts-ignore Property 'url' is missing in type '{}' but required in type '{ url: URL; }'.
|
||||
return this.binary.emit(httpOpts, event);
|
||||
} else if (mode === "structured") {
|
||||
// @ts-ignore Property 'url' is missing in type '{}' but required in type '{ url: URL; }'.
|
||||
return this.structured.emit(httpOpts, event);
|
||||
}
|
||||
throw new TypeError(`Unknown transport mode ${mode}.`);
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -108,6 +108,8 @@ const {
|
|||
DEFAULT_SPEC_VERSION_HEADER
|
||||
} = require("./constants");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
/**
|
||||
* A class to receive a CloudEvent from an HTTP POST request.
|
||||
*/
|
||||
|
@ -172,7 +174,7 @@ function getVersion(mode, headers, body) {
|
|||
}
|
||||
} else {
|
||||
// structured mode - the version is in the body
|
||||
return body instanceof String
|
||||
return (typeof body === "string")
|
||||
? JSON.parse(body).specversion : body.specversion;
|
||||
}
|
||||
return SPEC_V1;
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -119,11 +119,10 @@ class BinaryHTTPReceiver {
|
|||
* Checks an incoming HTTP request to determine if it conforms to the
|
||||
* Cloud Event specification for this receiver.
|
||||
*
|
||||
* @throws {ValidationError} if the event does not conform to the spec
|
||||
* @param {Object} payload the HTTP request body
|
||||
* @param {Object} headers the HTTP request headers
|
||||
*
|
||||
* @returns {void}
|
||||
* @returns {boolean} true if the the provided payload and headers conform to the spec
|
||||
* @throws {ValidationError} if the event does not conform to the spec
|
||||
*/
|
||||
check(payload, headers) {
|
||||
return check(payload, headers, this.receiver);
|
||||
|
@ -133,10 +132,10 @@ class BinaryHTTPReceiver {
|
|||
* Parses an incoming HTTP request, converting it to a {CloudEvent}
|
||||
* instance if it conforms to the Cloud Event specification for this receiver.
|
||||
*
|
||||
* @throws {ValidationError} of the event does not conform to the spec
|
||||
* @param {Object} payload the HTTP request body
|
||||
* @param {Object} headers the HTTP request headers
|
||||
* @returns {CloudEvent} an instance of CloudEvent representing the incoming request
|
||||
* @throws {ValidationError} of the event does not conform to the spec
|
||||
*/
|
||||
parse(payload, headers) {
|
||||
return parse(payload, headers, this.receiver);
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>
|
||||
bindings/http/receiver_structured.js - Documentation
|
||||
</title>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||
|
||||
<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/collapse.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<svg style="display: none;">
|
||||
<defs>
|
||||
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="top-nav-wrapper">
|
||||
<ul>
|
||||
<li >
|
||||
<a href="index.html">
|
||||
|
||||
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h3 class="reference-title">
|
||||
cloudevents-sdk
|
||||
</h3>
|
||||
|
||||
|
||||
<h3>
|
||||
Resources
|
||||
</h3>
|
||||
|
||||
<a href="concepts.html">Concepts</a>
|
||||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">
|
||||
bindings/http/receiver_structured.js
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>const ReceiverV1 = require("./v1/receiver_structured_1.js");
|
||||
const ReceiverV3 = require("./v03/receiver_structured_0_3.js");
|
||||
|
||||
const { SPEC_V03, SPEC_V1 } = require("./constants.js");
|
||||
const { check, parse } = require("./validation/structured.js");
|
||||
|
||||
/**
|
||||
* A utility class used to receive structured CloudEvents
|
||||
* over HTTP.
|
||||
* @see {StructuredReceiver}
|
||||
*/
|
||||
class StructuredHTTPReceiver {
|
||||
/**
|
||||
* Creates a new StructuredHTTPReceiver. Supports Cloud Events specification
|
||||
* versions 0.3 and 1.0 (default).
|
||||
*
|
||||
* @param {string} version the Cloud Events specification version. Default: 1.0.
|
||||
*/
|
||||
constructor(version = SPEC_V1) {
|
||||
if (version === SPEC_V1) {
|
||||
this.receiver = new ReceiverV1();
|
||||
} else if (version === SPEC_V03) {
|
||||
this.receiver = new ReceiverV3();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the provided payload and headers conform to the Cloud Events
|
||||
* specification version supported by this instance.
|
||||
*
|
||||
* @param {object} payload the cloud event data payload
|
||||
* @param {object} headers the HTTP headers received for this cloud event
|
||||
* @returns {boolean} true if the payload and header combination are valid
|
||||
* @throws {ValidationError} if the payload and header combination do not conform to the spec
|
||||
*/
|
||||
check(payload, headers) {
|
||||
return check(payload, headers, this.receiver);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new CloudEvent instance based on the provided payload and headers.
|
||||
*
|
||||
* @param {object} payload the cloud event data payload
|
||||
* @param {object} headers the HTTP headers received for this cloud event
|
||||
* @returns {CloudEvent} a new CloudEvent instance for the provided headers and payload
|
||||
* @throws {ValidationError} if the payload and header combination do not conform to the spec
|
||||
*/
|
||||
parse(payload, headers) {
|
||||
return parse(payload, headers, this.receiver);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = StructuredHTTPReceiver;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a>
|
||||
</footer>
|
||||
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/pagelocation.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,173 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>
|
||||
bindings/http/v03/emitter_binary_0_3.js - Documentation
|
||||
</title>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||
|
||||
<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/collapse.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<svg style="display: none;">
|
||||
<defs>
|
||||
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="top-nav-wrapper">
|
||||
<ul>
|
||||
<li >
|
||||
<a href="index.html">
|
||||
|
||||
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h3 class="reference-title">
|
||||
cloudevents-sdk
|
||||
</h3>
|
||||
|
||||
|
||||
<h3>
|
||||
Resources
|
||||
</h3>
|
||||
|
||||
<a href="concepts.html">Concepts</a>
|
||||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">
|
||||
bindings/http/v03/emitter_binary_0_3.js
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>const {
|
||||
HEADER_CONTENT_TYPE,
|
||||
BINARY_HEADERS_03
|
||||
} = require("../constants.js");
|
||||
|
||||
const passThroughParser = (v) => v;
|
||||
|
||||
/**
|
||||
* A utility object used to retrieve the header names for a CloudEvent
|
||||
* using the CloudEvent getter function.
|
||||
*/
|
||||
const headerByGetter = {
|
||||
getDataContentType: {
|
||||
name: HEADER_CONTENT_TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getDataContentEncoding: {
|
||||
name: BINARY_HEADERS_03.CONTENT_ENCODING,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSubject: {
|
||||
name: BINARY_HEADERS_03.SUBJECT,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getType: {
|
||||
name: BINARY_HEADERS_03.TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSpecversion: {
|
||||
name: BINARY_HEADERS_03.SPEC_VERSION,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSource: {
|
||||
name: BINARY_HEADERS_03.SOURCE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getId: {
|
||||
name: BINARY_HEADERS_03.ID,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getTime: {
|
||||
name: BINARY_HEADERS_03.TIME,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSchemaurl: {
|
||||
name: BINARY_HEADERS_03.SCHEMA_URL,
|
||||
parser: passThroughParser
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = headerByGetter;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a>
|
||||
</footer>
|
||||
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/pagelocation.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,168 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>
|
||||
bindings/http/v1/emitter_binary_1.js - Documentation
|
||||
</title>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||
|
||||
<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/collapse.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<svg style="display: none;">
|
||||
<defs>
|
||||
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="top-nav-wrapper">
|
||||
<ul>
|
||||
<li >
|
||||
<a href="index.html">
|
||||
|
||||
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h3 class="reference-title">
|
||||
cloudevents-sdk
|
||||
</h3>
|
||||
|
||||
|
||||
<h3>
|
||||
Resources
|
||||
</h3>
|
||||
|
||||
<a href="concepts.html">Concepts</a>
|
||||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">
|
||||
bindings/http/v1/emitter_binary_1.js
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>const {
|
||||
HEADER_CONTENT_TYPE,
|
||||
BINARY_HEADERS_1
|
||||
} = require("../constants.js");
|
||||
|
||||
const passThroughParser = (v) => v;
|
||||
|
||||
/**
|
||||
* A utility object used to retrieve the header names for a CloudEvent
|
||||
* using the CloudEvent getter function.
|
||||
*/
|
||||
const headerByGetter = {
|
||||
getDataContentType: {
|
||||
name: HEADER_CONTENT_TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSubject: {
|
||||
name: BINARY_HEADERS_1.SUBJECT,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getType: {
|
||||
name: BINARY_HEADERS_1.TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSpecversion: {
|
||||
name: BINARY_HEADERS_1.SPEC_VERSION,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getSource: {
|
||||
name: BINARY_HEADERS_1.SOURCE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getId: {
|
||||
name: BINARY_HEADERS_1.ID,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getTime: {
|
||||
name: BINARY_HEADERS_1.TIME,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
getDataschema: {
|
||||
name: BINARY_HEADERS_1.DATA_SCHEMA,
|
||||
parser: passThroughParser
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = headerByGetter;
|
||||
</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a>
|
||||
</footer>
|
||||
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/pagelocation.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -91,6 +91,11 @@
|
|||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* @typedef {import("ajv").ErrorObject} ErrorObject
|
||||
* @ignore
|
||||
* */
|
||||
|
||||
/**
|
||||
* A Error class that will be thrown when a CloudEvent
|
||||
* cannot be properly validated against a specification.
|
||||
*/
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
@ -103,8 +103,10 @@ class CloudEvent {
|
|||
* @param {Formatter} [userFormatter] Converts the event into a readable string
|
||||
*/
|
||||
constructor(userSpec, userFormatter) {
|
||||
this.spec = userSpec ? new userSpec(CloudEvent) : new Spec(CloudEvent);
|
||||
this.formatter = userFormatter ? new userFormatter() : new Formatter();
|
||||
// @ts-ignore Type 'Spec1' has no construct signatures.
|
||||
this.spec = (userSpec) ? new userSpec(CloudEvent) : new Spec(CloudEvent);
|
||||
// @ts-ignore Type 'JSONFormatter' has no construct signatures.
|
||||
this.formatter = (userFormatter) ? new userFormatter() : new Formatter();
|
||||
|
||||
// The map of extensions
|
||||
this.extensions = {};
|
||||
|
@ -185,7 +187,7 @@ class CloudEvent {
|
|||
/**
|
||||
* Sets the origination source of this event.
|
||||
* @see https://github.com/cloudevents/spec/blob/master/spec.md#source-1
|
||||
* @param {URI} source the context in which the event happened
|
||||
* @param {string} source the context in which the event happened in URI form
|
||||
* @returns {CloudEvent} this CloudEvent instance
|
||||
*/
|
||||
source(source) {
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
---
|
||||
title: Architecture and Concepts
|
||||
nav_order: 2
|
||||
---
|
||||
|
||||
# Architecture and Concepts
|
||||
{: .no_toc }
|
||||
|
||||
1. TOC
|
||||
{:toc}
|
||||
|
||||
## Spec and SDK Terms
|
||||
|
||||
- [Event](https://github.com/cloudevents/spec/blob/master/spec.md#event):
|
||||
The canonical form of the attributes and payload of the occurrence.
|
||||
- [Protocol](https://github.com/cloudevents/spec/blob/master/spec.md#protocol):
|
||||
Protocol is the messaging protocol used to send/receive events. In sdk-javascript
|
||||
the HTTP protocol is supported.
|
||||
- [Protocol Binding](https://github.com/cloudevents/spec/blob/master/spec.md#protocol-binding):
|
||||
Definition of how Events are mapped into Messages for the given Protocol. In sdk-javascript
|
||||
the HTTP Protocol binding is implemented in the [`HTTPReceiver`](HTTPReceiver.html).
|
||||
- [Message](https://github.com/cloudevents/spec/blob/master/spec.md#message):
|
||||
The encoded form of an Event for a given encoding and protocol.
|
||||
When a message is received in the sdk-javascript, the protocol implementation wraps it in a
|
||||
[`CloudEvent`](CloudEvent.html).
|
||||
- Message Writer: Logic required to take in a `Message` in a specific encoding and write out to a
|
||||
given Protocol (request, message). A Message Writer can be a
|
||||
[`StructuredWriter`](../lib/bindings/http/emitter_structured.js),
|
||||
a [`BinaryWriter`](../lib/bindings/http/emitter_binary_1.js) or both, depending on what encodings a
|
||||
Protocol supports.
|
||||
- [`Client`](../lib/bindings/http/http_receiver.js): Interface to interact with a Protocol implementation
|
||||
to send/receive Events. Clients also provide protocol agnostic features that can be
|
||||
applied to events, such as extensions.
|
||||
- Extensions: Anything that extends the base requirements from the CloudEvents spec.
|
||||
There are several
|
||||
[CloudEvents supported extensions](https://github.com/cloudevents/spec/tree/master/extensions).
|
||||
|
||||
## Investment Level
|
||||
|
||||
The amount of the SDK adopters would like to use is up to the adopter. We
|
||||
support the following:
|
||||
|
||||
- [Resource Level](event_data_structure.md): An adopter could use the Event data structure to interact with CloudEvents
|
||||
and marshal/unmarshal it to JSON.
|
||||
- [Message Level](protocol_implementations.md): An adopter could use directly `Message`s implementations and `Write*` functions
|
||||
to read and write CloudEvents messages from/to the wire, handling by hand the connection, the
|
||||
consumption and the production of messages from/to the protocol specific APIs.
|
||||
- [Protocol Level](protocol_implementations.md): An adopter could use Protocol implementations directly to consume/produce `Message`s
|
||||
without interacting with the protocol specific APIs.
|
||||
- [Client Level](../v2/client/client.go): An adopter selects a Protocol implementation and Events can
|
||||
be directly sent and received without requiring interactions with `Message`s.
|
||||
|
||||
## Personas
|
||||
|
||||
- [Producer](https://github.com/cloudevents/spec/blob/master/spec.md#producer),
|
||||
the "producer" is a specific instance, process or device that creates the data
|
||||
structure describing the CloudEvent.
|
||||
- [Consumer](https://github.com/cloudevents/spec/blob/master/spec.md#consumer),
|
||||
a "consumer" receives the event and acts upon it. It uses the context and data
|
||||
to execute some logic, which might lead to the occurrence of new events.
|
||||
- [Intermediary](https://github.com/cloudevents/spec/blob/master/spec.md#intermediary),
|
||||
An "intermediary" receives a message containing an event for the purpose of
|
||||
forwarding it to the next receiver, which might be another intermediary or a
|
||||
Consumer. A typical task for an intermediary is to route the event to
|
||||
receivers based on the information in the Context.
|
||||
|
||||
## Interaction Models
|
||||
|
||||
The SDK enables the following interaction models.
|
||||
|
||||
### Sender
|
||||
|
||||
Sender, when a Producer is creating new events.
|
||||
|
||||

|
||||
|
||||
### Receiver
|
||||
|
||||
Receiver, when a Consumer is accepting events.
|
||||
|
||||

|
||||
|
||||
### Forwarder
|
||||
|
||||
Forwarder, when a Intermediary accepts an event only after it has successfully
|
||||
continued the message to one or more Consumers.
|
||||
|
||||

|
||||
|
||||
### Mutator
|
||||
|
||||
Mutator, when a Producer or Intermediary blocks on a response from a Consumer,
|
||||
replacing the original Event.
|
||||
|
||||

|
|
@ -75,7 +75,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
|
|
@ -0,0 +1,325 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>
|
||||
Global - Documentation
|
||||
</title>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||
|
||||
<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/collapse.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<svg style="display: none;">
|
||||
<defs>
|
||||
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="top-nav-wrapper">
|
||||
<ul>
|
||||
<li >
|
||||
<a href="index.html">
|
||||
|
||||
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h3 class="reference-title">
|
||||
cloudevents-sdk
|
||||
</h3>
|
||||
|
||||
|
||||
<h3>
|
||||
Resources
|
||||
</h3>
|
||||
|
||||
<a href="concepts.html">Concepts</a>
|
||||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">
|
||||
Global
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<header>
|
||||
|
||||
<h2>
|
||||
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<div class="container-overview">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="subsection-title">Members</h3>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="headerByGetter">
|
||||
<span class="type-signature">(constant) </span>headerByGetter<span class="type-signature"></span>
|
||||
</h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>A utility object used to retrieve the header names for a CloudEvent
|
||||
using the CloudEvent getter function.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_v03_emitter_binary_0_3.js.html">bindings/http/v03/emitter_binary_0_3.js</a>, <a href="bindings_http_v03_emitter_binary_0_3.js.html#line12">line 12</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="headerByGetter">
|
||||
<span class="type-signature">(constant) </span>headerByGetter<span class="type-signature"></span>
|
||||
</h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>A utility object used to retrieve the header names for a CloudEvent
|
||||
using the CloudEvent getter function.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="bindings_http_v1_emitter_binary_1.js.html">bindings/http/v1/emitter_binary_1.js</a>, <a href="bindings_http_v1_emitter_binary_1.js.html#line12">line 12</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a>
|
||||
</footer>
|
||||
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/pagelocation.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
.PHONY: all
|
||||
|
||||
all: $(patsubst %.dot,%.svg,$(wildcard *.dot))
|
||||
|
||||
%.svg: %.dot
|
||||
dot -Tsvg $< -o $@
|
|
@ -1,9 +0,0 @@
|
|||
digraph {
|
||||
rankdir=LR;
|
||||
|
||||
Forwarder[shape=box]
|
||||
|
||||
downstream -> Forwarder;
|
||||
|
||||
Forwarder -> upstream;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="346pt" height="44pt"
|
||||
viewBox="0.00 0.00 346.02 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
||||
<title>%3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-40 342.02,-40 342.02,4 -4,4"/>
|
||||
<!-- Forwarder -->
|
||||
<g id="node1" class="node">
|
||||
<title>Forwarder</title>
|
||||
<polygon fill="none" stroke="black" points="217.13,-36 142.51,-36 142.51,0 217.13,0 217.13,-36"/>
|
||||
<text text-anchor="middle" x="179.82" y="-13.8" font-family="Times,serif" font-size="14.00">Forwarder</text>
|
||||
</g>
|
||||
<!-- upstream -->
|
||||
<g id="node3" class="node">
|
||||
<title>upstream</title>
|
||||
<ellipse fill="none" stroke="black" cx="295.5" cy="-18" rx="42.55" ry="18"/>
|
||||
<text text-anchor="middle" x="295.5" y="-13.8" font-family="Times,serif" font-size="14.00">upstream</text>
|
||||
</g>
|
||||
<!-- Forwarder->upstream -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Forwarder->upstream</title>
|
||||
<path fill="none" stroke="black" d="M217.1,-18C225.22,-18 234,-18 242.62,-18"/>
|
||||
<polygon fill="black" stroke="black" points="242.62,-21.5 252.62,-18 242.62,-14.5 242.62,-21.5"/>
|
||||
</g>
|
||||
<!-- downstream -->
|
||||
<g id="node2" class="node">
|
||||
<title>downstream</title>
|
||||
<ellipse fill="none" stroke="black" cx="53.33" cy="-18" rx="53.16" ry="18"/>
|
||||
<text text-anchor="middle" x="53.33" y="-13.8" font-family="Times,serif" font-size="14.00">downstream</text>
|
||||
</g>
|
||||
<!-- downstream->Forwarder -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>downstream->Forwarder</title>
|
||||
<path fill="none" stroke="black" d="M106.76,-18C115.17,-18 123.83,-18 132.09,-18"/>
|
||||
<polygon fill="black" stroke="black" points="132.31,-21.5 142.31,-18 132.31,-14.5 132.31,-21.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.9 KiB |
|
@ -1,7 +0,0 @@
|
|||
digraph {
|
||||
rankdir=LR;
|
||||
|
||||
Mutator[shape=box]
|
||||
|
||||
Mutator -> upstream[dir=both];
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="190pt" height="44pt"
|
||||
viewBox="0.00 0.00 190.15 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
||||
<title>%3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-40 186.15,-40 186.15,4 -4,4"/>
|
||||
<!-- Mutator -->
|
||||
<g id="node1" class="node">
|
||||
<title>Mutator</title>
|
||||
<polygon fill="none" stroke="black" points="61.16,-36 -0.05,-36 -0.05,0 61.16,0 61.16,-36"/>
|
||||
<text text-anchor="middle" x="30.55" y="-13.8" font-family="Times,serif" font-size="14.00">Mutator</text>
|
||||
</g>
|
||||
<!-- upstream -->
|
||||
<g id="node2" class="node">
|
||||
<title>upstream</title>
|
||||
<ellipse fill="none" stroke="black" cx="139.63" cy="-18" rx="42.55" ry="18"/>
|
||||
<text text-anchor="middle" x="139.63" y="-13.8" font-family="Times,serif" font-size="14.00">upstream</text>
|
||||
</g>
|
||||
<!-- Mutator->upstream -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Mutator->upstream</title>
|
||||
<path fill="none" stroke="black" d="M71.57,-18C76.49,-18 81.57,-18 86.64,-18"/>
|
||||
<polygon fill="black" stroke="black" points="71.38,-14.5 61.38,-18 71.38,-21.5 71.38,-14.5"/>
|
||||
<polygon fill="black" stroke="black" points="86.96,-21.5 96.96,-18 86.96,-14.5 86.96,-21.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,6 +0,0 @@
|
|||
digraph {
|
||||
rankdir=LR;
|
||||
|
||||
Receiver[shape=box]
|
||||
downstream -> Receiver;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="216pt" height="44pt"
|
||||
viewBox="0.00 0.00 216.41 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
||||
<title>%3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-40 212.41,-40 212.41,4 -4,4"/>
|
||||
<!-- Receiver -->
|
||||
<g id="node1" class="node">
|
||||
<title>Receiver</title>
|
||||
<polygon fill="none" stroke="black" points="208.28,-36 142.79,-36 142.79,0 208.28,0 208.28,-36"/>
|
||||
<text text-anchor="middle" x="175.53" y="-13.8" font-family="Times,serif" font-size="14.00">Receiver</text>
|
||||
</g>
|
||||
<!-- downstream -->
|
||||
<g id="node2" class="node">
|
||||
<title>downstream</title>
|
||||
<ellipse fill="none" stroke="black" cx="53.33" cy="-18" rx="53.16" ry="18"/>
|
||||
<text text-anchor="middle" x="53.33" y="-13.8" font-family="Times,serif" font-size="14.00">downstream</text>
|
||||
</g>
|
||||
<!-- downstream->Receiver -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>downstream->Receiver</title>
|
||||
<path fill="none" stroke="black" d="M106.7,-18C115.33,-18 124.18,-18 132.51,-18"/>
|
||||
<polygon fill="black" stroke="black" points="132.74,-21.5 142.74,-18 132.74,-14.5 132.74,-21.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,7 +0,0 @@
|
|||
digraph {
|
||||
rankdir=LR;
|
||||
|
||||
Sender[shape=box]
|
||||
|
||||
Sender -> upstream;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="184pt" height="44pt"
|
||||
viewBox="0.00 0.00 183.92 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
||||
<title>%3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-40 179.92,-40 179.92,4 -4,4"/>
|
||||
<!-- Sender -->
|
||||
<g id="node1" class="node">
|
||||
<title>Sender</title>
|
||||
<polygon fill="none" stroke="black" points="54.81,-36 0.06,-36 0.06,0 54.81,0 54.81,-36"/>
|
||||
<text text-anchor="middle" x="27.44" y="-13.8" font-family="Times,serif" font-size="14.00">Sender</text>
|
||||
</g>
|
||||
<!-- upstream -->
|
||||
<g id="node2" class="node">
|
||||
<title>upstream</title>
|
||||
<ellipse fill="none" stroke="black" cx="133.4" cy="-18" rx="42.55" ry="18"/>
|
||||
<text text-anchor="middle" x="133.4" y="-13.8" font-family="Times,serif" font-size="14.00">upstream</text>
|
||||
</g>
|
||||
<!-- Sender->upstream -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Sender->upstream</title>
|
||||
<path fill="none" stroke="black" d="M54.94,-18C62.72,-18 71.52,-18 80.32,-18"/>
|
||||
<polygon fill="black" stroke="black" points="80.59,-21.5 90.59,-18 80.59,-14.5 80.59,-21.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,7 +0,0 @@
|
|||
digraph {
|
||||
rankdir=LR;
|
||||
|
||||
Client -> ProtocolBinding [label="[Event]"]
|
||||
ProtocolBinding -> ProtocolBindingImpl [label="[Event, Message]"]
|
||||
ProtocolBindingImpl -> Protocol [label="[Message]"]
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="766pt" height="44pt"
|
||||
viewBox="0.00 0.00 765.55 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
||||
<title>%3</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-40 761.55,-40 761.55,4 -4,4"/>
|
||||
<!-- Client -->
|
||||
<g id="node1" class="node">
|
||||
<title>Client</title>
|
||||
<ellipse fill="none" stroke="black" cx="31.72" cy="-18" rx="31.95" ry="18"/>
|
||||
<text text-anchor="middle" x="31.72" y="-13.8" font-family="Times,serif" font-size="14.00">Client</text>
|
||||
</g>
|
||||
<!-- ProtocolBinding -->
|
||||
<g id="node2" class="node">
|
||||
<title>ProtocolBinding</title>
|
||||
<ellipse fill="none" stroke="black" cx="210" cy="-18" rx="68.65" ry="18"/>
|
||||
<text text-anchor="middle" x="210" y="-13.8" font-family="Times,serif" font-size="14.00">ProtocolBinding</text>
|
||||
</g>
|
||||
<!-- Client->ProtocolBinding -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Client->ProtocolBinding</title>
|
||||
<path fill="none" stroke="black" d="M63.83,-18C82.6,-18 107.41,-18 131.2,-18"/>
|
||||
<polygon fill="black" stroke="black" points="131.32,-21.5 141.32,-18 131.32,-14.5 131.32,-21.5"/>
|
||||
<text text-anchor="middle" x="102.44" y="-20.8" font-family="Times,serif" font-size="14.00">[Event]</text>
|
||||
</g>
|
||||
<!-- ProtocolBindingImpl -->
|
||||
<g id="node3" class="node">
|
||||
<title>ProtocolBindingImpl</title>
|
||||
<ellipse fill="none" stroke="black" cx="497.82" cy="-18" rx="85.05" ry="18"/>
|
||||
<text text-anchor="middle" x="497.82" y="-13.8" font-family="Times,serif" font-size="14.00">ProtocolBindingImpl</text>
|
||||
</g>
|
||||
<!-- ProtocolBinding->ProtocolBindingImpl -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>ProtocolBinding->ProtocolBindingImpl</title>
|
||||
<path fill="none" stroke="black" d="M278.73,-18C315.64,-18 361.89,-18 402.29,-18"/>
|
||||
<polygon fill="black" stroke="black" points="402.43,-21.5 412.43,-18 402.43,-14.5 402.43,-21.5"/>
|
||||
<text text-anchor="middle" x="345.56" y="-20.8" font-family="Times,serif" font-size="14.00">[Event, Message]</text>
|
||||
</g>
|
||||
<!-- Protocol -->
|
||||
<g id="node4" class="node">
|
||||
<title>Protocol</title>
|
||||
<ellipse fill="none" stroke="black" cx="717.48" cy="-18" rx="40.15" ry="18"/>
|
||||
<text text-anchor="middle" x="717.48" y="-13.8" font-family="Times,serif" font-size="14.00">Protocol</text>
|
||||
</g>
|
||||
<!-- ProtocolBindingImpl->Protocol -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>ProtocolBindingImpl->Protocol</title>
|
||||
<path fill="none" stroke="black" d="M583.28,-18C611.62,-18 642.28,-18 667.03,-18"/>
|
||||
<polygon fill="black" stroke="black" points="667.25,-21.5 677.25,-18 667.25,-14.5 667.25,-21.5"/>
|
||||
<text text-anchor="middle" x="630.25" y="-20.8" font-family="Times,serif" font-size="14.00">[Message]</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.9 KiB |
|
@ -73,7 +73,7 @@
|
|||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="BinaryHTTPReceiver-nav"><a href="BinaryHTTPReceiver.html">BinaryHTTPReceiver</a><ul class='methods'><li data-type="method" id="BinaryHTTPReceiver-check-nav"><a href="BinaryHTTPReceiver.html#check">check</a></li><li data-type="method" id="BinaryHTTPReceiver-parse-nav"><a href="BinaryHTTPReceiver.html#parse">parse</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="StructuredHTTPReceiver-nav"><a href="StructuredHTTPReceiver.html">StructuredHTTPReceiver</a><ul class='methods'><li data-type="method" id="StructuredHTTPReceiver-check-nav"><a href="StructuredHTTPReceiver.html#check">check</a></li><li data-type="method" id="StructuredHTTPReceiver-parse-nav"><a href="StructuredHTTPReceiver.html#parse">parse</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul><h3 id="global-nav">Global</h3><ul><li><a href="global.html#headerByGetter">headerByGetter</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>
|
||||
validation_error.js - Documentation
|
||||
</title>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
|
||||
|
||||
<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/collapse.css">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<svg style="display: none;">
|
||||
<defs>
|
||||
<symbol id="linkIcon" fill="#706d77" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="top-nav-wrapper">
|
||||
<ul>
|
||||
<li >
|
||||
<a href="index.html">
|
||||
|
||||
<svg fill="#6D6D6D" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||
<path d="M0 0h24v24H0z" fill="none"/>
|
||||
</svg>
|
||||
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h3 class="reference-title">
|
||||
cloudevents-sdk
|
||||
</h3>
|
||||
|
||||
|
||||
<h3>
|
||||
Resources
|
||||
</h3>
|
||||
|
||||
<a href="concepts.html">Concepts</a>
|
||||
|
||||
|
||||
|
||||
<h3>Classes</h3><ul><li id="BinaryHTTPEmitter-nav"><a href="BinaryHTTPEmitter.html">BinaryHTTPEmitter</a><ul class='methods'><li data-type="method" id="BinaryHTTPEmitter-emit-nav"><a href="BinaryHTTPEmitter.html#emit">emit</a></li></ul></li><li id="CloudEvent-nav"><a href="CloudEvent.html">CloudEvent</a><ul class='methods'><li data-type="method" id="CloudEvent-addExtension-nav"><a href="CloudEvent.html#addExtension">addExtension</a></li><li data-type="method" id="CloudEvent-data-nav"><a href="CloudEvent.html#data">data</a></li><li data-type="method" id="CloudEvent-dataContenttype-nav"><a href="CloudEvent.html#dataContenttype">dataContenttype</a></li><li data-type="method" id="CloudEvent-format-nav"><a href="CloudEvent.html#format">format</a></li><li data-type="method" id="CloudEvent-getData-nav"><a href="CloudEvent.html#getData">getData</a></li><li data-type="method" id="CloudEvent-getDataContenttype-nav"><a href="CloudEvent.html#getDataContenttype">getDataContenttype</a></li><li data-type="method" id="CloudEvent-getExtensions-nav"><a href="CloudEvent.html#getExtensions">getExtensions</a></li><li data-type="method" id="CloudEvent-getFormats-nav"><a href="CloudEvent.html#getFormats">getFormats</a></li><li data-type="method" id="CloudEvent-getId-nav"><a href="CloudEvent.html#getId">getId</a></li><li data-type="method" id="CloudEvent-getSource-nav"><a href="CloudEvent.html#getSource">getSource</a></li><li data-type="method" id="CloudEvent-getSpecversion-nav"><a href="CloudEvent.html#getSpecversion">getSpecversion</a></li><li data-type="method" id="CloudEvent-getTime-nav"><a href="CloudEvent.html#getTime">getTime</a></li><li data-type="method" id="CloudEvent-getType-nav"><a href="CloudEvent.html#getType">getType</a></li><li data-type="method" id="CloudEvent-id-nav"><a href="CloudEvent.html#id">id</a></li><li data-type="method" id="CloudEvent-source-nav"><a href="CloudEvent.html#source">source</a></li><li data-type="method" id="CloudEvent-time-nav"><a href="CloudEvent.html#time">time</a></li><li data-type="method" id="CloudEvent-toString-nav"><a href="CloudEvent.html#toString">toString</a></li><li data-type="method" id="CloudEvent-type-nav"><a href="CloudEvent.html#type">type</a></li></ul></li><li id="HTTPEmitter-nav"><a href="HTTPEmitter.html">HTTPEmitter</a><ul class='methods'><li data-type="method" id="HTTPEmitter-headers-nav"><a href="HTTPEmitter.html#headers">headers</a></li><li data-type="method" id="HTTPEmitter-send-nav"><a href="HTTPEmitter.html#send">send</a></li></ul></li><li id="HTTPReceiver-nav"><a href="HTTPReceiver.html">HTTPReceiver</a><ul class='methods'><li data-type="method" id="HTTPReceiver-accept-nav"><a href="HTTPReceiver.html#accept">accept</a></li></ul></li><li id="StructuredHTTPEmitter-nav"><a href="StructuredHTTPEmitter.html">StructuredHTTPEmitter</a><ul class='methods'><li data-type="method" id="StructuredHTTPEmitter-emit-nav"><a href="StructuredHTTPEmitter.html#emit">emit</a></li></ul></li><li id="ValidationError-nav"><a href="ValidationError.html">ValidationError</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<div id="main">
|
||||
|
||||
<h1 class="page-title">
|
||||
validation_error.js
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<article>
|
||||
<pre class="prettyprint source linenums"><code>/**
|
||||
* A Error class that will be thrown when a CloudEvent
|
||||
* cannot be properly validated against a the specification.
|
||||
*/
|
||||
class ValidationError extends TypeError {
|
||||
/**
|
||||
* Constructs a new {ValidationError} with the message
|
||||
* and array of additional errors.
|
||||
* @param {string} message the error message
|
||||
* @param {string[]|ErrorObject[]} [errors] any additional errors related to validation
|
||||
*/
|
||||
constructor(message, errors) {
|
||||
super(message);
|
||||
this.errors = errors ? errors : [];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ValidationError;</code></pre>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a>
|
||||
</footer>
|
||||
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/pagelocation.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||
const axios = require("axios");
|
||||
const { default: Axios } = require("axios");
|
||||
const EmitterV1 = require("./v1").BinaryEmitter;
|
||||
const EmitterV3 = require("./v03").BinaryEmitter;
|
||||
|
||||
|
@ -77,10 +77,11 @@ class BinaryHTTPEmitter {
|
|||
});
|
||||
|
||||
config[DATA_ATTRIBUTE] = data;
|
||||
config.headers = headers;
|
||||
config[HEADERS] = headers;
|
||||
|
||||
// Return the Promise
|
||||
return axios.request(config);
|
||||
// @ts-ignore Types of property 'url' are incompatible. Type 'URL' is not assignable to type 'string'.
|
||||
return Axios.request(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
const axios = require("axios");
|
||||
const { default: Axios } = require("axios");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
const {
|
||||
DATA_ATTRIBUTE,
|
||||
DEFAULT_CE_CONTENT_TYPE,
|
||||
|
@ -31,7 +34,8 @@ class StructuredHTTPEmitter {
|
|||
async emit(options, cloudevent) {
|
||||
const config = { ...defaults, ...options };
|
||||
config[DATA_ATTRIBUTE] = cloudevent.format();
|
||||
return axios.request(config);
|
||||
// @ts-ignore Types of property 'url' are incompatible. Type 'URL' is not assignable to type 'string'.
|
||||
return Axios.request(config);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
const BinaryHTTPEmitter = require("./emitter_binary.js");
|
||||
const StructuredEmitter = require("./emitter_structured.js");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
const {
|
||||
SPEC_V03,
|
||||
SPEC_V1
|
||||
|
@ -23,7 +25,7 @@ class HTTPEmitter {
|
|||
* @param {string} [options.version] The HTTP binding specification version. Default: "1.0"
|
||||
* @throws {TypeError} if no options.url is provided or an unknown specification version is provided.
|
||||
*/
|
||||
constructor({ url, version = SPEC_V1 } = {}) {
|
||||
constructor({ url, version = SPEC_V1 } = { url: undefined }) {
|
||||
if (version !== SPEC_V03 && version !== SPEC_V1) {
|
||||
throw new TypeError(
|
||||
`Unknown CloudEvent specification version: ${version}`);
|
||||
|
@ -51,12 +53,15 @@ class HTTPEmitter {
|
|||
* Possible values are "binary" and "structured". Default: structured
|
||||
* @returns {Promise} Promise with an eventual response from the receiver
|
||||
*/
|
||||
send(event, { url, mode = "binary", ...httpOpts } = {}) {
|
||||
send(event, { url, mode = "binary", ...httpOpts } = { url: undefined }) {
|
||||
if (!url) { url = this.url; }
|
||||
// @ts-ignore Property 'url' does not exist on type '{}'
|
||||
httpOpts.url = url;
|
||||
if (mode === "binary") {
|
||||
// @ts-ignore Property 'url' is missing in type '{}' but required in type '{ url: URL; }'.
|
||||
return this.binary.emit(httpOpts, event);
|
||||
} else if (mode === "structured") {
|
||||
// @ts-ignore Property 'url' is missing in type '{}' but required in type '{ url: URL; }'.
|
||||
return this.structured.emit(httpOpts, event);
|
||||
}
|
||||
throw new TypeError(`Unknown transport mode ${mode}.`);
|
||||
|
|
|
@ -16,6 +16,8 @@ const {
|
|||
DEFAULT_SPEC_VERSION_HEADER
|
||||
} = require("./constants");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
/**
|
||||
* A class to receive a CloudEvent from an HTTP POST request.
|
||||
*/
|
||||
|
@ -80,7 +82,7 @@ function getVersion(mode, headers, body) {
|
|||
}
|
||||
} else {
|
||||
// structured mode - the version is in the body
|
||||
return body instanceof String
|
||||
return (typeof body === "string")
|
||||
? JSON.parse(body).specversion : body.specversion;
|
||||
}
|
||||
return SPEC_V1;
|
||||
|
|
|
@ -4,6 +4,8 @@ const ReceiverV3 = require("./v03/receiver_binary_0_3.js");
|
|||
const { SPEC_V03, SPEC_V1 } = require("./constants.js");
|
||||
const { check, parse } = require("./validation/binary.js");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
/**
|
||||
* A class that receives binary CloudEvents over HTTP. This class can be used
|
||||
* if you know that all incoming events will be using binary transport. If
|
||||
|
@ -27,11 +29,10 @@ class BinaryHTTPReceiver {
|
|||
* Checks an incoming HTTP request to determine if it conforms to the
|
||||
* Cloud Event specification for this receiver.
|
||||
*
|
||||
* @throws {ValidationError} if the event does not conform to the spec
|
||||
* @param {Object} payload the HTTP request body
|
||||
* @param {Object} headers the HTTP request headers
|
||||
*
|
||||
* @returns {void}
|
||||
* @returns {boolean} true if the the provided payload and headers conform to the spec
|
||||
* @throws {ValidationError} if the event does not conform to the spec
|
||||
*/
|
||||
check(payload, headers) {
|
||||
return check(payload, headers, this.receiver);
|
||||
|
@ -41,10 +42,10 @@ class BinaryHTTPReceiver {
|
|||
* Parses an incoming HTTP request, converting it to a {CloudEvent}
|
||||
* instance if it conforms to the Cloud Event specification for this receiver.
|
||||
*
|
||||
* @throws {ValidationError} of the event does not conform to the spec
|
||||
* @param {Object} payload the HTTP request body
|
||||
* @param {Object} headers the HTTP request headers
|
||||
* @returns {CloudEvent} an instance of CloudEvent representing the incoming request
|
||||
* @throws {ValidationError} of the event does not conform to the spec
|
||||
*/
|
||||
parse(payload, headers) {
|
||||
return parse(payload, headers, this.receiver);
|
||||
|
|
|
@ -4,7 +4,20 @@ const ReceiverV3 = require("./v03/receiver_structured_0_3.js");
|
|||
const { SPEC_V03, SPEC_V1 } = require("./constants.js");
|
||||
const { check, parse } = require("./validation/structured.js");
|
||||
|
||||
/** @typedef {import("../../cloudevent")} CloudEvent */
|
||||
|
||||
/**
|
||||
* A utility class used to receive structured CloudEvents
|
||||
* over HTTP.
|
||||
* @see {StructuredReceiver}
|
||||
*/
|
||||
class StructuredHTTPReceiver {
|
||||
/**
|
||||
* Creates a new StructuredHTTPReceiver. Supports Cloud Events specification
|
||||
* versions 0.3 and 1.0 (default).
|
||||
*
|
||||
* @param {string} version the Cloud Events specification version. Default: 1.0.
|
||||
*/
|
||||
constructor(version = SPEC_V1) {
|
||||
if (version === SPEC_V1) {
|
||||
this.receiver = new ReceiverV1();
|
||||
|
@ -13,10 +26,27 @@ class StructuredHTTPReceiver {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the provided payload and headers conform to the Cloud Events
|
||||
* specification version supported by this instance.
|
||||
*
|
||||
* @param {object} payload the cloud event data payload
|
||||
* @param {object} headers the HTTP headers received for this cloud event
|
||||
* @returns {boolean} true if the payload and header combination are valid
|
||||
* @throws {ValidationError} if the payload and header combination do not conform to the spec
|
||||
*/
|
||||
check(payload, headers) {
|
||||
return check(payload, headers, this.receiver);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new CloudEvent instance based on the provided payload and headers.
|
||||
*
|
||||
* @param {object} payload the cloud event data payload
|
||||
* @param {object} headers the HTTP headers received for this cloud event
|
||||
* @returns {CloudEvent} a new CloudEvent instance for the provided headers and payload
|
||||
* @throws {ValidationError} if the payload and header combination do not conform to the spec
|
||||
*/
|
||||
parse(payload, headers) {
|
||||
return parse(payload, headers, this.receiver);
|
||||
}
|
||||
|
|
|
@ -3,51 +3,57 @@ const {
|
|||
BINARY_HEADERS_03
|
||||
} = require("../constants.js");
|
||||
|
||||
const headerByGetter = {};
|
||||
const passThroughParser = (v) => v;
|
||||
|
||||
headerByGetter.getDataContentType = {
|
||||
name: HEADER_CONTENT_TYPE,
|
||||
parser: (v) => v
|
||||
};
|
||||
/**
|
||||
* A utility object used to retrieve the header names for a CloudEvent
|
||||
* using the CloudEvent getter function.
|
||||
*/
|
||||
const headerByGetter = {
|
||||
getDataContentType: {
|
||||
name: HEADER_CONTENT_TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getDataContentEncoding = {
|
||||
name: BINARY_HEADERS_03.CONTENT_ENCODING,
|
||||
parser: (v) => v
|
||||
};
|
||||
getDataContentEncoding: {
|
||||
name: BINARY_HEADERS_03.CONTENT_ENCODING,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSubject = {
|
||||
name: BINARY_HEADERS_03.SUBJECT,
|
||||
parser: (v) => v
|
||||
};
|
||||
getSubject: {
|
||||
name: BINARY_HEADERS_03.SUBJECT,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getType = {
|
||||
name: BINARY_HEADERS_03.TYPE,
|
||||
parser: (v) => v
|
||||
};
|
||||
getType: {
|
||||
name: BINARY_HEADERS_03.TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSpecversion = {
|
||||
name: BINARY_HEADERS_03.SPEC_VERSION,
|
||||
parser: (v) => v
|
||||
};
|
||||
getSpecversion: {
|
||||
name: BINARY_HEADERS_03.SPEC_VERSION,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSource = {
|
||||
name: BINARY_HEADERS_03.SOURCE,
|
||||
parser: (v) => v
|
||||
};
|
||||
getSource: {
|
||||
name: BINARY_HEADERS_03.SOURCE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getId = {
|
||||
name: BINARY_HEADERS_03.ID,
|
||||
parser: (v) => v
|
||||
};
|
||||
getId: {
|
||||
name: BINARY_HEADERS_03.ID,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getTime = {
|
||||
name: BINARY_HEADERS_03.TIME,
|
||||
parser: (v) => v
|
||||
};
|
||||
getTime: {
|
||||
name: BINARY_HEADERS_03.TIME,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSchemaurl = {
|
||||
name: BINARY_HEADERS_03.SCHEMA_URL,
|
||||
parser: (v) => v
|
||||
getSchemaurl: {
|
||||
name: BINARY_HEADERS_03.SCHEMA_URL,
|
||||
parser: passThroughParser
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = headerByGetter;
|
||||
|
|
|
@ -20,14 +20,12 @@ const parserByType = {
|
|||
|
||||
const parsersByEncoding = {
|
||||
null: parserByType,
|
||||
undefined: parserByType
|
||||
};
|
||||
|
||||
// base64
|
||||
parsersByEncoding[ENCODING_BASE64] = {
|
||||
[MIME_JSON]: new JSONParser(new Base64Parser()),
|
||||
[MIME_OCTET_STREAM]: {
|
||||
parse(payload) { return payload; }
|
||||
undefined: parserByType,
|
||||
[ENCODING_BASE64]: {
|
||||
[MIME_JSON]: new JSONParser(new Base64Parser()),
|
||||
[MIME_OCTET_STREAM]: {
|
||||
parse(payload) { return payload; }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -42,42 +40,18 @@ const requiredHeaders = [
|
|||
BINARY_HEADERS_03.ID
|
||||
];
|
||||
|
||||
const setterByHeader = {};
|
||||
setterByHeader[BINARY_HEADERS_03.TYPE] = {
|
||||
name: "type",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.SPEC_VERSION] = {
|
||||
name: "specversion",
|
||||
parser: () => "0.3"
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.SOURCE] = {
|
||||
name: "source",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.ID] = {
|
||||
name: "id",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.TIME] = {
|
||||
name: "time",
|
||||
parser: (v) => new Date(Date.parse(v))
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.SCHEMA_URL] = {
|
||||
name: "schemaurl",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByHeader[HEADER_CONTENT_TYPE] = {
|
||||
name: "dataContentType",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.CONTENT_ENCONDING] = {
|
||||
name: "dataContentEncoding",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByHeader[BINARY_HEADERS_03.SUBJECT] = {
|
||||
name: "subject",
|
||||
parser: (v) => v
|
||||
const passThroughParser = (v) => v;
|
||||
|
||||
const setterByHeader = {
|
||||
[BINARY_HEADERS_03.TYPE] : { name: "type", parser: passThroughParser },
|
||||
[BINARY_HEADERS_03.SPEC_VERSION] : { name: "specversion", parser: () => "0.3" },
|
||||
[BINARY_HEADERS_03.SOURCE] : { name: "source", parser: passThroughParser },
|
||||
[BINARY_HEADERS_03.ID] : { name: "id", parser: passThroughParser },
|
||||
[BINARY_HEADERS_03.TIME] : { name: "time", parser: (v) => new Date(Date.parse(v)) },
|
||||
[BINARY_HEADERS_03.SCHEMA_URL] : { name: "schemaurl", parser: passThroughParser },
|
||||
[HEADER_CONTENT_TYPE]: { name: "dataContentType", parser: passThroughParser },
|
||||
[BINARY_HEADERS_03.CONTENT_ENCONDING]: { name: "dataContentEncoding", parser: passThroughParser },
|
||||
[BINARY_HEADERS_03.SUBJECT] : { name: "subject", parser: passThroughParser }
|
||||
};
|
||||
|
||||
class Receiver {
|
||||
|
|
|
@ -119,6 +119,14 @@ const ajv = new Ajv({
|
|||
|
||||
const isValidAgainstSchema = ajv.compile(schema);
|
||||
|
||||
/** @typedef {import("../../../cloudevent")} CloudEvent */
|
||||
|
||||
/**
|
||||
* Decorates a CloudEvent with the 0.3 specification getters and setters
|
||||
* @param {object} [_caller] a CloudEvent class to decorate with the 0.3 spec
|
||||
* @returns {void}
|
||||
* @ignore
|
||||
*/
|
||||
function Spec03(_caller) {
|
||||
this.payload = {
|
||||
specversion: schema.definitions.specversion.const,
|
||||
|
@ -169,7 +177,7 @@ Spec03.prototype.check = function(ce) {
|
|||
const toCheck = (!ce ? this.payload : ce);
|
||||
|
||||
if (!isValidAgainstSchema(toCheck)) {
|
||||
throw new ValidationError("invalid payload", [isValidAgainstSchema.errors]);
|
||||
throw new ValidationError("invalid payload", isValidAgainstSchema.errors);
|
||||
}
|
||||
|
||||
Array.of(toCheck)
|
||||
|
|
|
@ -3,46 +3,52 @@ const {
|
|||
BINARY_HEADERS_1
|
||||
} = require("../constants.js");
|
||||
|
||||
const headerByGetter = {};
|
||||
const passThroughParser = (v) => v;
|
||||
|
||||
headerByGetter.getDataContentType = {
|
||||
name: HEADER_CONTENT_TYPE,
|
||||
parser: (v) => v
|
||||
};
|
||||
/**
|
||||
* A utility object used to retrieve the header names for a CloudEvent
|
||||
* using the CloudEvent getter function.
|
||||
*/
|
||||
const headerByGetter = {
|
||||
getDataContentType: {
|
||||
name: HEADER_CONTENT_TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSubject = {
|
||||
name: BINARY_HEADERS_1.SUBJECT,
|
||||
parser: (v) => v
|
||||
};
|
||||
getSubject: {
|
||||
name: BINARY_HEADERS_1.SUBJECT,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getType = {
|
||||
name: BINARY_HEADERS_1.TYPE,
|
||||
parser: (v) => v
|
||||
};
|
||||
getType: {
|
||||
name: BINARY_HEADERS_1.TYPE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSpecversion = {
|
||||
name: BINARY_HEADERS_1.SPEC_VERSION,
|
||||
parser: (v) => v
|
||||
};
|
||||
getSpecversion: {
|
||||
name: BINARY_HEADERS_1.SPEC_VERSION,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getSource = {
|
||||
name: BINARY_HEADERS_1.SOURCE,
|
||||
parser: (v) => v
|
||||
};
|
||||
getSource: {
|
||||
name: BINARY_HEADERS_1.SOURCE,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getId = {
|
||||
name: BINARY_HEADERS_1.ID,
|
||||
parser: (v) => v
|
||||
};
|
||||
getId: {
|
||||
name: BINARY_HEADERS_1.ID,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getTime = {
|
||||
name: BINARY_HEADERS_1.TIME,
|
||||
parser: (v) => v
|
||||
};
|
||||
getTime: {
|
||||
name: BINARY_HEADERS_1.TIME,
|
||||
parser: passThroughParser
|
||||
},
|
||||
|
||||
headerByGetter.getDataschema = {
|
||||
name: BINARY_HEADERS_1.DATA_SCHEMA,
|
||||
parser: (v) => v
|
||||
getDataschema: {
|
||||
name: BINARY_HEADERS_1.DATA_SCHEMA,
|
||||
parser: passThroughParser
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = headerByGetter;
|
||||
|
|
|
@ -16,10 +16,15 @@ const parserByType = {
|
|||
[MIME_OCTET_STREAM] : { parse(payload) { return payload; } }
|
||||
};
|
||||
|
||||
const parsersByEncoding = { [null] : parserByType, [undefined] : parserByType, [ENCODING_BASE64] : {} };
|
||||
parsersByEncoding[ENCODING_BASE64][MIME_JSON] = new JSONParser(new Base64Parser());
|
||||
parsersByEncoding[ENCODING_BASE64][MIME_OCTET_STREAM] = {
|
||||
parse(payload) { return payload; }
|
||||
const parsersByEncoding = {
|
||||
null: parserByType,
|
||||
undefined: parserByType,
|
||||
[ENCODING_BASE64]: {
|
||||
[MIME_JSON]: new JSONParser(new Base64Parser()),
|
||||
[MIME_OCTET_STREAM]: {
|
||||
parse(payload) { return payload; }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const allowedContentTypes = [MIME_JSON, MIME_OCTET_STREAM];
|
||||
|
@ -27,15 +32,17 @@ const allowedContentTypes = [MIME_JSON, MIME_OCTET_STREAM];
|
|||
const requiredHeaders = [BINARY_HEADERS_1.TYPE, BINARY_HEADERS_1.SPEC_VERSION,
|
||||
BINARY_HEADERS_1.SOURCE, BINARY_HEADERS_1.ID];
|
||||
|
||||
const passThroughParser = (v) => v;
|
||||
|
||||
const setterByHeader = {
|
||||
[BINARY_HEADERS_1.TYPE] : { name: "type", parser: (v) => v },
|
||||
[BINARY_HEADERS_1.TYPE] : { name: "type", parser: passThroughParser },
|
||||
[BINARY_HEADERS_1.SPEC_VERSION] : { name: "specversion", parser: () => "1.0" },
|
||||
[BINARY_HEADERS_1.SOURCE] : { name: "source", parser: (v) => v },
|
||||
[BINARY_HEADERS_1.ID] : { name: "id", parser: (v) => v },
|
||||
[BINARY_HEADERS_1.SOURCE] : { name: "source", parser: passThroughParser },
|
||||
[BINARY_HEADERS_1.ID] : { name: "id", parser: passThroughParser },
|
||||
[BINARY_HEADERS_1.TIME] : { name: "time", parser: (v) => new Date(Date.parse(v)) },
|
||||
[BINARY_HEADERS_1.DATA_SCHEMA] : { name: "dataschema", parser: (v) => v },
|
||||
[HEADER_CONTENT_TYPE] : { name: "dataContentType", parser: (v) => v },
|
||||
[BINARY_HEADERS_1.SUBJECT] : { name: "subject", parser: (v) => v }
|
||||
[BINARY_HEADERS_1.DATA_SCHEMA] : { name: "dataschema", parser: passThroughParser },
|
||||
[HEADER_CONTENT_TYPE] : { name: "dataContentType", parser: passThroughParser },
|
||||
[BINARY_HEADERS_1.SUBJECT] : { name: "subject", parser: passThroughParser }
|
||||
};
|
||||
|
||||
class Receiver {
|
||||
|
|
|
@ -115,6 +115,14 @@ const ajv = new Ajv({
|
|||
|
||||
const isValidAgainstSchema = ajv.compile(schema);
|
||||
|
||||
/** @typedef {import("../../../cloudevent")} CloudEvent */
|
||||
|
||||
/**
|
||||
* Decorates a CloudEvent with the 1.0 specification getters and setters
|
||||
* @param {object} [_caller] a CloudEvent class to decorate with the 1.0 spec
|
||||
* @returns {void}
|
||||
* @ignore
|
||||
*/
|
||||
function Spec1(_caller) {
|
||||
this.payload = {
|
||||
specversion: schema.definitions.specversion.const,
|
||||
|
@ -192,7 +200,7 @@ Spec1.prototype.check = function(ce) {
|
|||
const toCheck = (!ce ? this.payload : ce);
|
||||
|
||||
if (!isValidAgainstSchema(toCheck)) {
|
||||
throw new ValidationError("invalid payload", [isValidAgainstSchema.errors]);
|
||||
throw new ValidationError("invalid payload", isValidAgainstSchema.errors);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ function check(payload, headers, receiver) {
|
|||
if (sanityHeaders[DEFAULT_SPEC_VERSION_HEADER] !== receiver.specversion) {
|
||||
throw new ValidationError("invalid spec version", [sanityHeaders[DEFAULT_SPEC_VERSION_HEADER]]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function parse(payload, headers, receiver) {
|
||||
|
|
|
@ -18,6 +18,7 @@ function check(payload, headers, receiver) {
|
|||
.includes(sanityHeaders[HEADER_CONTENT_TYPE])) {
|
||||
throw new ValidationError("invalid content type", [sanityHeaders[HEADER_CONTENT_TYPE]]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function parse(payload, headers, receiver) {
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
/**
|
||||
* @typedef {import("ajv").ErrorObject} ErrorObject
|
||||
* @ignore
|
||||
* */
|
||||
|
||||
/**
|
||||
* A Error class that will be thrown when a CloudEvent
|
||||
* cannot be properly validated against a specification.
|
||||
|
|
|
@ -11,8 +11,10 @@ class CloudEvent {
|
|||
* @param {Formatter} [userFormatter] Converts the event into a readable string
|
||||
*/
|
||||
constructor(userSpec, userFormatter) {
|
||||
this.spec = userSpec ? new userSpec(CloudEvent) : new Spec(CloudEvent);
|
||||
this.formatter = userFormatter ? new userFormatter() : new Formatter();
|
||||
// @ts-ignore Type 'Spec1' has no construct signatures.
|
||||
this.spec = (userSpec) ? new userSpec(CloudEvent) : new Spec(CloudEvent);
|
||||
// @ts-ignore Type 'JSONFormatter' has no construct signatures.
|
||||
this.formatter = (userFormatter) ? new userFormatter() : new Formatter();
|
||||
|
||||
// The map of extensions
|
||||
this.extensions = {};
|
||||
|
@ -93,7 +95,7 @@ class CloudEvent {
|
|||
/**
|
||||
* Sets the origination source of this event.
|
||||
* @see https://github.com/cloudevents/spec/blob/master/spec.md#source-1
|
||||
* @param {URI} source the context in which the event happened
|
||||
* @param {string} source the context in which the event happened in URI form
|
||||
* @returns {CloudEvent} this CloudEvent instance
|
||||
*/
|
||||
source(source) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
|
@ -4,6 +4,8 @@
|
|||
"description": "CloudEvents SDK for JavaScript",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"type-check": "tsc --noEmitOnError --emitDeclarationOnly",
|
||||
"prelint": "npm run type-check",
|
||||
"lint": "standardx index.js lib examples",
|
||||
"fix": "standardx --fix",
|
||||
"pretest": "npm run lint",
|
||||
|
@ -15,7 +17,8 @@
|
|||
"release": "standard-version"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
"lib",
|
||||
"index.d.ts"
|
||||
],
|
||||
"standard-version": {
|
||||
"types": [
|
||||
|
@ -96,6 +99,9 @@
|
|||
"uuid": "~8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ajv": "^1.0.0",
|
||||
"@types/axios": "^0.14.0",
|
||||
"@types/node": "^13.13.5",
|
||||
"chai": "~4.2.0",
|
||||
"eslint-config-standard": "^14.1.1",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
|
@ -106,7 +112,8 @@
|
|||
"nock": "~12.0.3",
|
||||
"nyc": "~15.0.0",
|
||||
"standard-version": "^7.1.0",
|
||||
"standardx": "^5.0.0"
|
||||
"standardx": "^5.0.0",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2016", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||
"allowJs": true, /* Allow javascript files to be compiled. */
|
||||
"checkJs": true, /* Report errors in .js files. */
|
||||
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
"strict": false, /* Enable all strict type-checking options. */
|
||||
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue