1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

updating docs

This commit is contained in:
ainsley
2019-06-28 18:38:16 -05:00
parent c11442c680
commit 5759234c1b
183 changed files with 283 additions and 329 deletions

View File

@@ -2383,7 +2383,7 @@
<div class="tab__content">
<pre id="connect_token_go_content"><a class="toolbar-icons pull-right" target="_blank" href="https://github.com/nats-io/go-nats-examples/blob/master/api-examples/connect_token/main.go#L10-20"><i class="mdi mdi-github-circle" title="View on GitHub"></i></a><a class="toolbar-icons pull-right"><i class="mdi mdi-content-copy js-copy" title="Copy to Clipboard"></i></a><span class="copy-msg pull-right"></span><code class="language-go"><span class="token comment">// Set a token</span>
nc<span class="token punctuation">,</span> err <span class="token operator">:=</span> nats<span class="token punctuation">.</span><span class="token function">Connect</span><span class="token punctuation">(</span><span class="token string">&quot;localhost&quot;</span><span class="token punctuation">,</span> nats<span class="token punctuation">.</span><span class="token function">Token</span><span class="token punctuation">(</span><span class="token string">&quot;mytoken&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
nc<span class="token punctuation">,</span> err <span class="token operator">:=</span> nats<span class="token punctuation">.</span><span class="token function">Connect</span><span class="token punctuation">(</span><span class="token string">&quot;127.0.0.1&quot;</span><span class="token punctuation">,</span> nats<span class="token punctuation">.</span><span class="token function">Name</span><span class="token punctuation">(</span><span class="token string">&quot;API Token Example&quot;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> nats<span class="token punctuation">.</span><span class="token function">Token</span><span class="token punctuation">(</span><span class="token string">&quot;mytoken&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token keyword">if</span> err <span class="token operator">!=</span> <span class="token boolean">nil</span> <span class="token punctuation">{</span>
log<span class="token punctuation">.</span><span class="token function">Fatal</span><span class="token punctuation">(</span>err<span class="token punctuation">)</span>
<span class="token punctuation">}</span>
@@ -2569,7 +2569,7 @@ nc<span class="token punctuation">.</span><span class="token function">close</sp
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Authenticating with a Token","level":"3.4.2","depth":2,"next":{"title":"Authenticating with an NKey","level":"3.4.3","depth":2,"path":"developer/security/nkey.md","ref":"developer/security/nkey.md","articles":[]},"previous":{"title":"Authenticating with a User and Password","level":"3.4.1","depth":2,"path":"developer/security/userpass.md","ref":"developer/security/userpass.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/security/token.md","mtime":"2019-05-31T18:06:28.938Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-06-27T18:05:07.318Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Authenticating with a Token","level":"3.4.2","depth":2,"next":{"title":"Authenticating with an NKey","level":"3.4.3","depth":2,"path":"developer/security/nkey.md","ref":"developer/security/nkey.md","articles":[]},"previous":{"title":"Authenticating with a User and Password","level":"3.4.1","depth":2,"path":"developer/security/userpass.md","ref":"developer/security/userpass.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-sharing","-highlight","include-html","toggle-chapters","anchors","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"include-html":{},"fontsettings":{"theme":"white","family":"sans","size":2},"edit-link":{"label":"","base":"https://github.com/nats-io/docs/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"developer/security/token.md","mtime":"2019-05-31T18:06:28.938Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-06-28T23:37:18.980Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>