[#67] generating doc

This commit is contained in:
Felipe Ripoll 2018-09-05 06:08:57 -06:00
parent 323ce81506
commit fbd4c28307
25 changed files with 123 additions and 41 deletions

View File

@ -4,7 +4,7 @@ fonts/icomoon.eot
fonts/icomoon.svg
fonts/icomoon.ttf
fonts/icomoon.woff
dist/sidebar_items-b6949c5547.js
dist/sidebar_items-f62ce50de1.js
api-reference.html
initial_architecture.html
search.html

View File

@ -8,7 +8,7 @@
<title>404 poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Auth.Guardian.Plug poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Auth.Models.Token poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Auth.Models.User poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Auth.REST poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>
@ -265,9 +265,6 @@ cache-control: max-age=0, private, must-revalidate
</tr>
</thead>
<tr>
<td style="text-align: left">content-type</td><td style="text-align: left">application/json or application/msgpack</td>
</tr>
<tr>
<td style="text-align: left">authorization</td><td style="text-align: left">Basic encodeBase64(adminname + “:” + password)</td>
</tr>
</table>
@ -288,12 +285,9 @@ cache-control: max-age=0, private, must-revalidate
<tr>
<td style="text-align: left">401</td><td style="text-align: left">Authentication failed</td>
</tr>
<tr>
<td style="text-align: left">415</td><td style="text-align: left">Unsupported Media Type (only application/json and application/msgpack allowed)</td>
</tr>
</table>
<p>Example:</p>
<pre><code class="elixir">curl -i -X GET -H &quot;Authorization: Basic YWRtaW4xOnBhc3N3b3JkMTIzNDU2Nzg=&quot; -H &quot;Content-Type: application/json&quot; https://localhost:4003/user --insecure
<pre><code class="elixir">curl -i -X GET -H &quot;Authorization: Basic YWRtaW4xOnBhc3N3b3JkMTIzNDU2Nzg=&quot; https://localhost:4003/user --insecure
HTTP/1.1 200 OK
server: Cowboy
@ -308,6 +302,56 @@ cache-control: max-age=0, private, must-revalidate
&quot;active&quot;:true, # active means it is not banned
&quot;created_at&quot;:&quot;2018-09-03T16:02:25.210308&quot;
}</code></pre>
<h2 id="module-delete-user-endpoint" class="section-heading">
<a href="#module-delete-user-endpoint" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Delete User Endpoint
</h2>
<p>This Endpoint is needed in order to delete a user from the system.</p>
<p><code class="inline">DELETE /user/:username</code></p>
<table>
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th style="text-align: left">HTTP header</th><th style="text-align: left">Values</th>
</tr>
</thead>
<tr>
<td style="text-align: left">authorization</td><td style="text-align: left">Basic encodeBase64(adminname + “:” + password)</td>
</tr>
</table>
<p>Response</p>
<table>
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<th style="text-align: left">CODE</th><th style="text-align: left">Description</th>
</tr>
</thead>
<tr>
<td style="text-align: left">204</td><td style="text-align: left">Success</td>
</tr>
<tr>
<td style="text-align: left">401</td><td style="text-align: left">Authentication failed</td>
</tr>
<tr>
<td style="text-align: left">404</td><td style="text-align: left">The user provided doesnt exist in the system</td>
</tr>
</table>
<p>Example:</p>
<pre><code class="elixir">curl -i -X DELETE -H &quot;Authorization: Basic YWRtaW4xOnBhc3N3b3JkMTIzNDU2Nzg=&quot; https://localhost:4003/user/4uVIqWSf --insecure
HTTP/1.1 204 No Content
server: Cowboy
date: Tue, 04 Sep 2018 13:49:45 GMT
content-length: 0
cache-control: max-age=0, private, must-revalidate</code></pre>
<h2 id="module-blacklist-token-endpoint" class="section-heading">
<a href="#module-blacklist-token-endpoint" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Blacklist Token Endpoint

View File

@ -8,7 +8,7 @@
<title>POABackend.Auth poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>
@ -166,6 +166,15 @@ expiration time as Integer</p>
<div class="summary-synopsis"><p>This function Deactivates a user, storing <code class="inline">active: false</code> in the database for the given user</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#delete_user/1">delete_user(user_name)</a>
</div>
<div class="summary-synopsis"><p>This function deletes the user associated with the user name passed as a parameter</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
@ -327,7 +336,7 @@ with that name in the database already</p>
</a>
<span class="signature">authenticate_admin(admin_name, password)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L106" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L120" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -387,7 +396,7 @@ with that name in the database already</p>
</a>
<span class="signature">create_banned_token(jwt_token)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L166" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L180" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -418,7 +427,7 @@ This function will extract the expiration time from the claims and store them in
</a>
<span class="signature">create_banned_token(token, expires)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L180" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L194" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -503,6 +512,35 @@ expiration time as Integer.</p>
</section>
</div>
<div class="detail" id="delete_user/1">
<div class="detail-header">
<a href="#delete_user/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">delete_user(user_name)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L106" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>delete_user(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) :: {:ok, :deleted} | {:error, :notfound}</pre>
</div>
</div>
<section class="docstring">
<p>This function deletes the user associated with the user name passed as a parameter</p>
</section>
</div>
<div class="detail" id="generate_password/0">
@ -513,7 +551,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">generate_password()</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L141" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L155" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -542,7 +580,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">generate_user_name()</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L120" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L134" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -571,7 +609,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">generate_user_name(user_name)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L130" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L144" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -658,7 +696,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">purge_banned_tokens()</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L212" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L226" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -716,7 +754,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">token_banned?(token)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L229" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L243" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -774,7 +812,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">valid_token?(jwt_token)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L194" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L208" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
@ -803,7 +841,7 @@ expiration time as Integer.</p>
</a>
<span class="signature">valid_user_name?(user_name)</span>
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L150" class="view-source" rel="help" title="View Source">
<a href="https://github.com/poanetwork/poa-netstats-wharehouse/blob/v0.1.0/lib/poa_backend/auth.ex#L164" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>

View File

@ -8,7 +8,7 @@
<title>POABackend.CustomHandler.REST poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.CustomHandler poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Protocol.DataType poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Protocol.Message poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Protocol.MessageType poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Protocol poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Receiver poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Receivers.Dashboard poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Receivers.DynamoDB poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Receivers.Eth.Stats poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Receivers.Repo poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend.Receivers.System.Stats poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>POABackend poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>API Reference poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

File diff suppressed because one or more lines are too long

1
doc/dist/sidebar_items-f62ce50de1.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
<title>Initial Architecture poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>

View File

@ -8,7 +8,7 @@
<title>Search poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-b6949c5547.js"></script>
<script src="dist/sidebar_items-f62ce50de1.js"></script>