mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
doc: Add developer documentation using Sphinx
- This is completely reworked but based on /Developer page in the FreedomBox Manual. - This documentation can be made available as static site on https://docs.freedombox.org and the /Developer page in the FreedomBox Manual can be dropped. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
108f7b8d46
commit
80498919fb
32 files changed
+1655
No files matched your search
@@ -0,0 +1,37 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
|
||||
App Module
|
||||
----------
|
||||
|
||||
These methods are optionally provided by the module in which an app is
|
||||
implemented and FreedomBox calls/uses them if they are present.
|
||||
|
||||
<app-module>.init()
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Optional. This method is called by FreedomBox soon after all the applications
|
||||
are loaded. The ``init()`` call order guarantees that other applications that
|
||||
this application depends on will be initialized before this application is
|
||||
initialized.
|
||||
|
||||
<app-module>.diagnose()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Optional. Called when the user invokes system-wide diagnostics by visiting
|
||||
**System -> Diagnositcs**. This method must return an array of diagnostic
|
||||
results. Each diagnostic result must be a two-tuple with first element as a
|
||||
string that is shown to the user as name of the test and second element is the
|
||||
result of the test. It must be one of ``passed``, ``failed``, ``error``. Example
|
||||
return value:
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
[('Check http://localhost/app is reachable', 'passed'),
|
||||
('Check configuration is sane', 'passed')]
|
||||
|
||||
<app-module>.depends
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Optional. This module property must contain a list of all apps that this
|
||||
application depends on. The application is specified as string containing the
|
||||
full module load path. For example, ``names``.
|
||||
Reference in new issue
Block a user