module-src_common.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Module: src/common</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Module: src/common</h1>
  17. <section>
  18. <header>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. </div>
  23. <h3 class="subsection-title">Methods</h3>
  24. <h4 class="name" id=".deserializeCls"><span class="type-signature">(static) </span>deserializeCls<span class="signature">(cls)</span><span class="type-signature"> &rarr; {function}</span></h4>
  25. <div class="description">
  26. Get a function that deserializes a specific type of protobuf.
  27. </div>
  28. <h5>Parameters:</h5>
  29. <table class="params">
  30. <thead>
  31. <tr>
  32. <th>Name</th>
  33. <th>Type</th>
  34. <th class="last">Description</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <tr>
  39. <td class="name"><code>cls</code></td>
  40. <td class="type">
  41. <span class="param-type">function</span>
  42. </td>
  43. <td class="description last">The constructor of the message type to deserialize</td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. <dl class="details">
  48. <dt class="tag-source">Source:</dt>
  49. <dd class="tag-source"><ul class="dummy"><li>
  50. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line47">line 47</a>
  51. </li></ul></dd>
  52. </dl>
  53. <h5>Returns:</h5>
  54. <div class="param-desc">
  55. The deserialization function
  56. </div>
  57. <dl>
  58. <dt>
  59. Type
  60. </dt>
  61. <dd>
  62. <span class="param-type">function</span>
  63. </dd>
  64. </dl>
  65. <h4 class="name" id=".fullyQualifiedName"><span class="type-signature">(static) </span>fullyQualifiedName<span class="signature">(value)</span><span class="type-signature"> &rarr; {string}</span></h4>
  66. <div class="description">
  67. Get the fully qualified (dotted) name of a ProtoBuf.Reflect value.
  68. </div>
  69. <h5>Parameters:</h5>
  70. <table class="params">
  71. <thead>
  72. <tr>
  73. <th>Name</th>
  74. <th>Type</th>
  75. <th class="last">Description</th>
  76. </tr>
  77. </thead>
  78. <tbody>
  79. <tr>
  80. <td class="name"><code>value</code></td>
  81. <td class="type">
  82. <span class="param-type">ProtoBuf.Reflect.Namespace</span>
  83. </td>
  84. <td class="description last">The value to get the name of</td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. <dl class="details">
  89. <dt class="tag-source">Source:</dt>
  90. <dd class="tag-source"><ul class="dummy"><li>
  91. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line85">line 85</a>
  92. </li></ul></dd>
  93. </dl>
  94. <h5>Returns:</h5>
  95. <div class="param-desc">
  96. The fully qualified name of the value
  97. </div>
  98. <dl>
  99. <dt>
  100. Type
  101. </dt>
  102. <dd>
  103. <span class="param-type">string</span>
  104. </dd>
  105. </dl>
  106. <h4 class="name" id=".getProtobufServiceAttrs"><span class="type-signature">(static) </span>getProtobufServiceAttrs<span class="signature">(service)</span><span class="type-signature"> &rarr; {Object}</span></h4>
  107. <div class="description">
  108. Return a map from method names to method attributes for the service.
  109. </div>
  110. <h5>Parameters:</h5>
  111. <table class="params">
  112. <thead>
  113. <tr>
  114. <th>Name</th>
  115. <th>Type</th>
  116. <th class="last">Description</th>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <tr>
  121. <td class="name"><code>service</code></td>
  122. <td class="type">
  123. <span class="param-type">ProtoBuf.Reflect.Service</span>
  124. </td>
  125. <td class="description last">The service to get attributes for</td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. <dl class="details">
  130. <dt class="tag-source">Source:</dt>
  131. <dd class="tag-source"><ul class="dummy"><li>
  132. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line127">line 127</a>
  133. </li></ul></dd>
  134. </dl>
  135. <h5>Returns:</h5>
  136. <div class="param-desc">
  137. The attributes map
  138. </div>
  139. <dl>
  140. <dt>
  141. Type
  142. </dt>
  143. <dd>
  144. <span class="param-type">Object</span>
  145. </dd>
  146. </dl>
  147. <h4 class="name" id=".serializeCls"><span class="type-signature">(static) </span>serializeCls<span class="signature">(Cls)</span><span class="type-signature"> &rarr; {function}</span></h4>
  148. <div class="description">
  149. Get a function that serializes objects to a buffer by protobuf class.
  150. </div>
  151. <h5>Parameters:</h5>
  152. <table class="params">
  153. <thead>
  154. <tr>
  155. <th>Name</th>
  156. <th>Type</th>
  157. <th class="last">Description</th>
  158. </tr>
  159. </thead>
  160. <tbody>
  161. <tr>
  162. <td class="name"><code>Cls</code></td>
  163. <td class="type">
  164. <span class="param-type">function</span>
  165. </td>
  166. <td class="description last">The constructor of the message type to serialize</td>
  167. </tr>
  168. </tbody>
  169. </table>
  170. <dl class="details">
  171. <dt class="tag-source">Source:</dt>
  172. <dd class="tag-source"><ul class="dummy"><li>
  173. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line67">line 67</a>
  174. </li></ul></dd>
  175. </dl>
  176. <h5>Returns:</h5>
  177. <div class="param-desc">
  178. The serialization function
  179. </div>
  180. <dl>
  181. <dt>
  182. Type
  183. </dt>
  184. <dd>
  185. <span class="param-type">function</span>
  186. </dd>
  187. </dl>
  188. <h4 class="name" id=".wrapIgnoreNull"><span class="type-signature">(static) </span>wrapIgnoreNull<span class="signature">(func<span class="signature-attributes">nullable</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
  189. <div class="description">
  190. Wrap a function to pass null-like values through without calling it. If no
  191. function is given, just uses the identity;
  192. </div>
  193. <h5>Parameters:</h5>
  194. <table class="params">
  195. <thead>
  196. <tr>
  197. <th>Name</th>
  198. <th>Type</th>
  199. <th>Attributes</th>
  200. <th class="last">Description</th>
  201. </tr>
  202. </thead>
  203. <tbody>
  204. <tr>
  205. <td class="name"><code>func</code></td>
  206. <td class="type">
  207. <span class="param-type">function</span>
  208. </td>
  209. <td class="attributes">
  210. &lt;nullable><br>
  211. </td>
  212. <td class="description last">The function to wrap</td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <dl class="details">
  217. <dt class="tag-source">Source:</dt>
  218. <dd class="tag-source"><ul class="dummy"><li>
  219. <a href="src_common.js.html">src/common.js</a>, <a href="src_common.js.html#line110">line 110</a>
  220. </li></ul></dd>
  221. </dl>
  222. <h5>Returns:</h5>
  223. <div class="param-desc">
  224. The wrapped function
  225. </div>
  226. <dl>
  227. <dt>
  228. Type
  229. </dt>
  230. <dd>
  231. <span class="param-type">function</span>
  232. </dd>
  233. </dl>
  234. </article>
  235. </section>
  236. </div>
  237. <nav>
  238. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-src_client.html">src/client</a></li><li><a href="module-src_common.html">src/common</a></li><li><a href="module-src_metadata.html">src/metadata</a></li><li><a href="module-src_server.html">src/server</a></li></ul><h3>Classes</h3><ul><li><a href="module-src_client.makeClientConstructor-Client.html">Client</a></li><li><a href="module-src_client-ClientDuplexStream.html">ClientDuplexStream</a></li><li><a href="module-src_client-ClientReadableStream.html">ClientReadableStream</a></li><li><a href="module-src_client-ClientWritableStream.html">ClientWritableStream</a></li><li><a href="module-src_metadata-Metadata.html">Metadata</a></li><li><a href="module-src_server-Server.html">Server</a></li><li><a href="module-src_server-ServerDuplexStream.html">ServerDuplexStream</a></li><li><a href="module-src_server-ServerReadableStream.html">ServerReadableStream</a></li><li><a href="module-src_server-ServerWritableStream.html">ServerWritableStream</a></li></ul><h3>Global</h3><ul><li><a href="global.html#callError">callError</a></li><li><a href="global.html#Credentials">Credentials</a></li><li><a href="global.html#getClientChannel">getClientChannel</a></li><li><a href="global.html#getGoogleAuthDelegate">getGoogleAuthDelegate</a></li><li><a href="global.html#load">load</a></li><li><a href="global.html#loadObject">loadObject</a></li><li><a href="global.html#makeGenericClientConstructor">makeGenericClientConstructor</a></li><li><a href="global.html#Metadata">Metadata</a></li><li><a href="global.html#propagate">propagate</a></li><li><a href="global.html#Server">Server</a></li><li><a href="global.html#ServerCredentials">ServerCredentials</a></li><li><a href="global.html#status">status</a></li><li><a href="global.html#waitForClientReady">waitForClientReady</a></li><li><a href="global.html#writeFlags">writeFlags</a></li></ul>
  239. </nav>
  240. <br class="clear">
  241. <footer>
  242. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Thu Oct 29 2015 13:07:25 GMT-0700 (PDT)
  243. </footer>
  244. <script> prettyPrint(); </script>
  245. <script src="scripts/linenumber.js"> </script>
  246. </body>
  247. </html>