File tree Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ Javascript SDK for CloudEvents
88``` text
99├── index.js
1010├── lib
11+ │ ├── bindings
12+ │ │ └── http
13+ │ │ └── structured_0_1.js
1114│ ├── cloudevent.js
12- │ ├── jsonformatter.js
1315│ ├── format
1416│ │ └── json_0_1.js
1517│ └── specs
@@ -20,12 +22,18 @@ Javascript SDK for CloudEvents
2022├── README.md
2123└── test
2224 ├── cloudevent_spec_0_1.js
23- └ ── cloudevent_spec_0_2.js
24-
25+ ├ ── cloudevent_spec_0_2.js
26+ └── http_binding_0_1.js
2527```
2628
2729* ` index.js ` : library exports
2830
31+ * ` lib/bindings ` : every binding implementation goes here
32+
33+ * ` lib/bindings/http ` : every http binding implementation goes here
34+
35+ * ` lib/bindings/http/structured_0_1.js ` : implementation of structured HTTP Binding
36+
2937* ` lib/cloudevent.js ` : implementation of Cloudevent, an interface
3038
3139* ` lib/format/ ` : every format implementation goes here
@@ -100,10 +108,27 @@ Every Spec class must implement these methods to work properly.
100108Spec (Cloudevent)
101109
102110/*
103- * Check the spec constraints, throwing an error if do not pass.
111+ * Checks the spec constraints, throwing an error if do not pass.
104112 */
105113Spec .check ()
106114
115+ ```
116+ ## ` Binding ` classes
117+
118+ Every Binding class must implement these methods to work properly.
119+
120+ ``` js
121+
122+ /*
123+ * The constructor must receives the map of configurations.
124+ */
125+ Binding (config)
126+
127+ /*
128+ * Emits the event using an instance of Cloudevent.
129+ */
130+ Binding .emit (cloudevent)
131+
107132```
108133
109134# How to use
You can’t perform that action at this time.
0 commit comments