mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-13 11:52:45 +02:00
If the environment variable BAPI_ENV_PATH is set, the config system will try to read configs from the given path instead of .env in pwd If no file is found .env in pwd will be used as a fallback Env variables will always override settings in .env files.
97 lines
2.7 KiB
Python
97 lines
2.7 KiB
Python
from fastapi import HTTPException, status
|
|
|
|
from app.apps.impl.apps_base import AppsBase
|
|
|
|
|
|
class _NotImplemented(HTTPException):
|
|
def __init__(self):
|
|
super().__init__(
|
|
status_code=status.HTTP_501_NOT_IMPLEMENTED,
|
|
detail="Not available in native python mode.",
|
|
)
|
|
|
|
|
|
class NativePythonApps(AppsBase):
|
|
async def get_app_status_single(self, app_id: str):
|
|
raise _NotImplemented()
|
|
|
|
async def get_app_status(self):
|
|
# TODO: revert me before merge to main
|
|
return [
|
|
{
|
|
"id": "btcpayserver",
|
|
"version": "v1.12.5",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
{
|
|
"id": "lnbits",
|
|
"version": "0.11.3",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
{
|
|
"id": "rtl",
|
|
"version": "v0.14.1",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
{
|
|
"id": "electrs",
|
|
"installed": True,
|
|
"configured": False,
|
|
"status": "online",
|
|
"localIP": "",
|
|
"httpPort": "",
|
|
"httpsPort": "",
|
|
"httpsForced": False,
|
|
"httpsSelfsigned": False,
|
|
"hiddenService": "",
|
|
"address": "http://:",
|
|
"authMethod": "none",
|
|
"details": {},
|
|
},
|
|
{
|
|
"id": "btc-rpc-explorer",
|
|
"version": "v3.4.0",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
{
|
|
"id": "mempool",
|
|
"version": "v2.5.0",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
{
|
|
"id": "jam",
|
|
"version": "0.2.0",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
{
|
|
"id": "thunderhub",
|
|
"version": "v0.13.30",
|
|
"installed": False,
|
|
"status": "offline",
|
|
"error": "",
|
|
},
|
|
]
|
|
|
|
async def get_app_status_advanced(self, app_id: str):
|
|
raise _NotImplemented()
|
|
|
|
async def get_app_status_sub(self):
|
|
raise _NotImplemented()
|
|
|
|
async def install_app_sub(self, app_id: str):
|
|
raise _NotImplemented()
|
|
|
|
async def uninstall_app_sub(self, app_id: str, delete_data: bool):
|
|
raise _NotImplemented()
|