Add docs to modules that were missing them
parent
0a55aa4cc3
commit
673d8a834c
|
@ -1,4 +1,10 @@
|
|||
defmodule FarmbotCore.Asset do
|
||||
@moduledoc """
|
||||
Top level module, with some helpers. Persists application resources to disk.
|
||||
Submodules of this module usually (but not always) correspond to a
|
||||
resource in the REST API. See official REST API docs for details.
|
||||
"""
|
||||
|
||||
alias FarmbotCore.Asset.{
|
||||
Repo,
|
||||
Device,
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
defmodule FarmbotCore.Asset.DiagnosticDump do
|
||||
@moduledoc """
|
||||
Just the DiagDump REST resource, used by FarmBot staff to help users debug
|
||||
remote device problems.
|
||||
"""
|
||||
|
||||
use FarmbotCore.Asset.Schema, path: "/api/diagnostic_dumps"
|
||||
|
||||
schema "diagnostic_dumps" do
|
||||
|
|
|
@ -111,7 +111,8 @@ defmodule FarmbotCore.AssetMonitor do
|
|||
|
||||
defp assert_result!(:ignore, _), do: :ok
|
||||
defp assert_result!({:ok, _}, _), do: :ok
|
||||
defp assert_result!(_, asset), do: exit("Failed to start or update child: #{inspect(asset)}")
|
||||
defp assert_result!(_, asset),
|
||||
do: exit("Failed to start or update child: #{inspect(asset)}")
|
||||
|
||||
def order,
|
||||
do: [
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
defmodule FarmbotCore.AssetSupervisor do
|
||||
@moduledoc """
|
||||
Supervises all database-backed records.
|
||||
"""
|
||||
|
||||
use Supervisor
|
||||
alias FarmbotCore.{Asset.Repo, AssetWorker}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
defprotocol FarmbotCore.AssetWorker do
|
||||
# A process that represents a single database row.
|
||||
|
||||
@doc "List of relational resources that need to be preloaded."
|
||||
def preload(asset)
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
defmodule FarmbotCore.BotStateNG do
|
||||
@moduledoc """
|
||||
The data strucutre behind the bot state tree (not the living process).
|
||||
Also has some helpers for batching changes.
|
||||
"""
|
||||
|
||||
alias FarmbotCore.{
|
||||
BotStateNG,
|
||||
BotStateNG.McuParams,
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
defmodule FarmbotCore.BotStateNG.Schema2Docs do
|
||||
@moduledoc """
|
||||
Turns the bot state tree schema into a typescript interface file.
|
||||
As of 26 March 19, it is incomplete
|
||||
"""
|
||||
|
||||
#TODO(RickCarlino): Complete this module
|
||||
|
||||
alias FarmbotCore.BotStateNG
|
||||
|
||||
def schema_to_ts do
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
defmodule FarmbotCore.EnigmaHandler do
|
||||
@moduledoc """
|
||||
Registers and deregisters a function that fires when an Enigma is created or
|
||||
destroyed.
|
||||
"""
|
||||
|
||||
use GenServer
|
||||
|
||||
# TODO(RickCarlino): Remote type does not exist. FIXME
|
||||
@type enigma :: FarmbotCore.Assets.Private.Enigma.t()
|
||||
|
||||
@doc """
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
defmodule FarmbotCore.StorageSupervisor do
|
||||
@moduledoc """
|
||||
Top-level supervisor for REST resources (Asset), configs and the logger.
|
||||
"""
|
||||
|
||||
use Supervisor
|
||||
|
||||
def start_link(args) do
|
||||
|
@ -13,4 +17,4 @@ defmodule FarmbotCore.StorageSupervisor do
|
|||
]
|
||||
Supervisor.init(children, [strategy: :one_for_one])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
defmodule FarmbotExt.AMQP.AutoSyncTransport do
|
||||
@moduledoc """
|
||||
This module provides an AMQP channel for
|
||||
auto-sync messages from the FarmBot API.
|
||||
SEE:
|
||||
https://developer.farm.bot/docs/realtime-updates-auto-sync#section-example-auto-sync-subscriptions
|
||||
"""
|
||||
use GenServer
|
||||
use AMQP
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
defmodule FarmbotExt.AMQP.BotStateTransport do
|
||||
@moduledoc """
|
||||
Responsible for broadcasting the bot state tree over AMQP/MQTT
|
||||
"""
|
||||
|
||||
use GenServer
|
||||
use AMQP
|
||||
alias AMQP.Channel
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
defmodule FarmbotExt.AMQP.CeleryScriptTransport do
|
||||
@moduledoc """
|
||||
Handles inbound CeleryScript RPCs (from user via AMQP/MQTT).
|
||||
"""
|
||||
|
||||
use GenServer
|
||||
use AMQP
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
defmodule FarmbotExt.AMQP.ConnectionWorker do
|
||||
@moduledoc """
|
||||
Manages the AMQP socket lifecycle.
|
||||
"""
|
||||
|
||||
use GenServer
|
||||
alias FarmbotCore.Project
|
||||
alias FarmbotExt.JWT
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
defmodule FarmbotExt.AMQP.LogTransport do
|
||||
@moduledoc """
|
||||
Handler for AMQP log channel
|
||||
"""
|
||||
|
||||
use GenServer
|
||||
use AMQP
|
||||
alias AMQP.Channel
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
defmodule FarmbotOS.Init.FSCheckup do
|
||||
@moduledoc false
|
||||
# Performs a filesystem checkup and formats the
|
||||
# volume on first boot.
|
||||
|
||||
use Supervisor
|
||||
require Logger
|
||||
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
defmodule FarmbotOS.Init.Supervisor do
|
||||
@moduledoc """
|
||||
All the stuff that needs to start before
|
||||
FarmBotOS gets supervised by this one.
|
||||
|
||||
Handles boot logic for FBOS (on host vs. RPi).
|
||||
"""
|
||||
|
||||
use Supervisor
|
||||
|
||||
def start_link(args) do
|
||||
|
|
Loading…
Reference in New Issue