poa-netstats-warehouse/doc/api-reference.html

252 lines
8.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.18.4">
<title>API Reference poa_backend v0.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<script src="dist/sidebar_items-f62ce50de1.js"></script>
</head>
<body data-type="extras">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="POABackend.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
poa_backend
</h1>
<h2 class="sidebar-projectVersion">
v0.1.0
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">poa_backend v0.1.0</small>
API Reference
</h1>
<section class="details-list">
<h2 id="modules" class="section-heading">
<a href="#modules" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Modules
</h2>
<div class="summary">
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.html">POABackend</a></div>
<div class="summary-synopsis"><h1>POABackend</h1>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Auth.html">POABackend.Auth</a></div>
<div class="summary-synopsis"><p>This module defines the API for the Authorisation</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Auth.Guardian.Plug.html">POABackend.Auth.Guardian.Plug</a></div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Auth.Models.Token.html">POABackend.Auth.Models.Token</a></div>
<div class="summary-synopsis"><p>This module encapsulates the <em>Token</em> model. This is used in order to store banned tokens in Database</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Auth.Models.User.html">POABackend.Auth.Models.User</a></div>
<div class="summary-synopsis"><p>This module encapsulates the <em>User</em> model</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Auth.REST.html">POABackend.Auth.REST</a></div>
<div class="summary-synopsis"><p>Here we define the REST Endpoints for Authentication/Authorization features in <code class="inline">poa_backend</code>.
There are two types of users who will use this Endpoints. </p>
<ul>
<li>One is the standard user which is associated to one Agent. This user will call only the <em>/session</em> endpoint in order to retrieve a <a href="https://jwt.io">JWT</a> token
needed for using the <em>POA Protocol</em> Endpoints. Those users are stored in a Database.
</li>
<li>The other kind of users are the POA administrators. This users can create <em>normal</em> users using the <em>/user</em> Endpoint, banning tokens, banning users…
Those Admins are defined in the Config (ie <code class="inline">prod.exs</code>) file and are loaded when the app starts. This is an example of how the Admins are defined
</li>
</ul>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.CustomHandler.html">POABackend.CustomHandler</a></div>
<div class="summary-synopsis"><p>A Custom Handler is responsible of handling data sent from Agents (i.e. REST over HTTP, WebSockets…) “speaking” the POA Protocol</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.CustomHandler.REST.html">POABackend.CustomHandler.REST</a></div>
<div class="summary-synopsis"><p>This module implements the REST Custom Handler over HTTP/1.1</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Protocol.html">POABackend.Protocol</a></div>
<div class="summary-synopsis"><h2 id="poa-protocol" class="section-heading">
<a href="#poa-protocol" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
POA Protocol
</h2>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Protocol.DataType.html">POABackend.Protocol.DataType</a></div>
<div class="summary-synopsis"><p>The protocol messages Data type</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Protocol.Message.html">POABackend.Protocol.Message</a></div>
<div class="summary-synopsis"><p>The message received from the Agent (inspired in <a href="https://hexdocs.pm/plug/Plug.Conn.html"><code class="inline">Plug.Conn</code></a>)</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Protocol.MessageType.html">POABackend.Protocol.MessageType</a></div>
<div class="summary-synopsis"><p>Regarding the POA Protocol only 2 types of message can be processed in the backend</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Receiver.html">POABackend.Receiver</a></div>
<div class="summary-synopsis"><p>Defines a Receiver Plugin</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Receivers.Dashboard.html">POABackend.Receivers.Dashboard</a></div>
<div class="summary-synopsis"><p>This is a Receiver Plugin which exposes a Websocket server and sends the metrics to the connected clients</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Receivers.DynamoDB.html">POABackend.Receivers.DynamoDB</a></div>
<div class="summary-synopsis"><p>This is a Receiver Plugin which stores the received Ethereum Blocks in DynamoDB</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Receivers.Eth.Stats.html">POABackend.Receivers.Eth.Stats</a></div>
<div class="summary-synopsis"><p>This is a Receiver Plugin which is in charge of storing the Ethereum Statistics received from the Agents in a Postgres
database. If we want to use it we have to declare it in the Config file, inside the <code class="inline">:receivers</code> section, ie</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Receivers.Repo.html">POABackend.Receivers.Repo</a></div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="POABackend.Receivers.System.Stats.html">POABackend.Receivers.System.Stats</a></div>
<div class="summary-synopsis"><p>This is a Receiver Plugin which is in charge of storing the System Metrics received from the Agents in a Postgres
database. If we want to use it we have to declare it in the Config file, inside the <code class="inline">:receivers</code> section, ie</p>
</div>
</div>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.4),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-9bd040e5e5.js"></script>
</body>
</html>