Sphinx generate docs
This commit is contained in:
parent
5bc23e7eb8
commit
af1420dbde
216 changed files with 39471 additions and 13 deletions
468
SRV/docs/_build/html/api/endpoints/auth.html
vendored
Normal file
468
SRV/docs/_build/html/api/endpoints/auth.html
vendored
Normal file
|
|
@ -0,0 +1,468 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="api.v1.ip" href="ip.html"><link rel="prev" title="API эндпоинты" href="../endpoints.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.auth - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ip.html">api.v1.ip</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="network.html">api.v1.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">api.v1.settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="subnet.html">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ufw.html">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="websocket.html">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/auth.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.auth">
|
||||
<span id="api-v1-auth"></span><h1>api.v1.auth<a class="headerlink" href="#module-api.v1.auth" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.auth.check_users_file">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.auth.</span></span><span class="sig-name descname"><span class="pre">check_users_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/auth.html#check_users_file"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.auth.check_users_file" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Проверяет, существует ли файл users.json и содержит ли он пользователей.</p>
|
||||
<p>Возвращает информацию о состоянии файла и наличии пользователей.</p>
|
||||
<dl class="simple">
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>dict: Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“exists” (bool): Существует ли файл.</p></li>
|
||||
<li><p>“has_users” (bool): Содержит ли файл пользователей.</p></li>
|
||||
<li><p>“message” (str): Сообщение с описанием результата.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка при проверке файла (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.auth.get_current_user">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.auth.</span></span><span class="sig-name descname"><span class="pre">get_current_user</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/auth.html#get_current_user"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.auth.get_current_user" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Возвращает данные текущего пользователя и токен.</p>
|
||||
<p>Проверяет активную сессию по client_id и возвращает информацию о пользователе
|
||||
и токен для дальнейшего использования.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (Request): Объект запроса для получения client_id (IP-адрес клиента).
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>dict: Словарь с ключами “user” (UserResponse), “access_token” (str) и</dt><dd><p>“token_type” (str, всегда “bearer”).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если сессия не найдена или истекла (status_code=401) или</dt><dd><p>произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.auth.login">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.auth.</span></span><span class="sig-name descname"><span class="pre">login</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/auth.html#models.auth.UserLogin" title="models.auth.UserLogin"><span class="pre">UserLogin</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/auth.html#login"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.auth.login" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Авторизует пользователя и создаёт сессию.</p>
|
||||
<p>Проверяет учетные данные пользователя и возвращает токен и session_id для
|
||||
последующей авторизации.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>user (UserLogin): Объект с данными для входа (username, password).
|
||||
request (Request): Объект запроса для получения client_id (IP-адрес клиента).
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>Token: Объект с access_token и session_id для авторизации.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если учетные данные неверны (status_code=401) или произошла</dt><dd><p>внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.auth.logout">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.auth.</span></span><span class="sig-name descname"><span class="pre">logout</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/auth.html#logout"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.auth.logout" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Выход из системы, удаление сессии.</p>
|
||||
<p>Удаляет активную сессию пользователя по client_id.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (Request): Объект запроса для получения client_id (IP-адрес клиента).
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Пустой словарь или сообщение об успешном выходе.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если сессия не найдена (status_code=401) или произошла</dt><dd><p>внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.auth.register">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.auth.</span></span><span class="sig-name descname"><span class="pre">register</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/auth.html#models.auth.UserCreate" title="models.auth.UserCreate"><span class="pre">UserCreate</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/auth.html#register"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.auth.register" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Регистрирует нового пользователя.</p>
|
||||
<p>Создаёт нового пользователя на основе предоставленных данных и возвращает
|
||||
информацию о зарегистрированном пользователе.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>user (UserCreate): Объект с данными нового пользователя (username, password, is_admin).
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>UserResponse: Объект с данными зарегистрированного пользователя (id, username, is_admin).</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если пользователь уже существует (status_code=400) или произошла</dt><dd><p>внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="ip.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">api.v1.ip</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="../endpoints.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">API эндпоинты</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.auth</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.auth.check_users_file"><code class="docutils literal notranslate"><span class="pre">check_users_file()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.auth.get_current_user"><code class="docutils literal notranslate"><span class="pre">get_current_user()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.auth.login"><code class="docutils literal notranslate"><span class="pre">login()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.auth.logout"><code class="docutils literal notranslate"><span class="pre">logout()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.auth.register"><code class="docutils literal notranslate"><span class="pre">register()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
447
SRV/docs/_build/html/api/endpoints/ip.html
vendored
Normal file
447
SRV/docs/_build/html/api/endpoints/ip.html
vendored
Normal file
|
|
@ -0,0 +1,447 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="api.v1.network" href="network.html"><link rel="prev" title="api.v1.auth" href="auth.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.ip - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">api.v1.auth</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.ip</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="network.html">api.v1.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">api.v1.settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="subnet.html">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ufw.html">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="websocket.html">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/ip.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.ip">
|
||||
<span id="api-v1-ip"></span><h1>api.v1.ip<a class="headerlink" href="#module-api.v1.ip" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ip.apply_ip_config">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ip.</span></span><span class="sig-name descname"><span class="pre">apply_ip_config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Body(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ip.html#apply_ip_config"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ip.apply_ip_config" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Применяет проверенные IP-настройки к указанному сетевому профилю.</p>
|
||||
<p>Обновляет настройки соединения через NetworkManager, отключает и
|
||||
переподключает устройство к сети.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>data (Dict[str, Any]): Словарь с данными конфигурации, включая</dt><dd><p>“connection_id” и “ipv4_updates” с обновлениями IP-настроек.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>dict: Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“success” (bool): Успешность операции.</p></li>
|
||||
<li><p>“message” (str): Сообщение об успешном применении настроек.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если подключение не найдено (status_code=404) или</dt><dd><p>произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ip.check_ip_config">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ip.</span></span><span class="sig-name descname"><span class="pre">check_ip_config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Body(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ip.html#check_ip_config"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ip.check_ip_config" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Проверяет доступность IP-адреса перед его применением.</p>
|
||||
<p>Выполняет ARP-сканирование для проверки, занят ли указанный IP-адрес,
|
||||
и возвращает результат проверки.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>data (Dict[str, Any]): Словарь с данными конфигурации, включая</dt><dd><p>“ipv4_updates” с полем “ipv4.address-data” для нового IP-адреса.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>Dict[str, Any]: Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“available” (bool): Доступен ли IP-адрес.</p></li>
|
||||
<li><p>“message” (str): Сообщение о результате проверки.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ip.save_ip_config">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ip.</span></span><span class="sig-name descname"><span class="pre">save_ip_config</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Body(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ip.html#save_ip_config"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ip.save_ip_config" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Применяет проверенные IP-настройки для отката сетевого профиля.</p>
|
||||
<p>Используется для сохранения и отката настроек сетевого профиля к предыдущему
|
||||
состоянию через NetworkManager.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>data (Dict[str, Any]): Словарь с данными конфигурации, включая</dt><dd><p>“connection_id” и “ipv4_updates” с обновлениями IP-настроек.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>dict: Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“success” (bool): Успешность операции.</p></li>
|
||||
<li><p>“message” (str): Сообщение об успешном применении настроек.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если подключение не найдено (status_code=404) или</dt><dd><p>произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="network.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">api.v1.network</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="auth.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">api.v1.auth</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.ip</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.ip.apply_ip_config"><code class="docutils literal notranslate"><span class="pre">apply_ip_config()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ip.check_ip_config"><code class="docutils literal notranslate"><span class="pre">check_ip_config()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ip.save_ip_config"><code class="docutils literal notranslate"><span class="pre">save_ip_config()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
476
SRV/docs/_build/html/api/endpoints/network.html
vendored
Normal file
476
SRV/docs/_build/html/api/endpoints/network.html
vendored
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="api.v1.settings" href="settings.html"><link rel="prev" title="api.v1.ip" href="ip.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.network - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">api.v1.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ip.html">api.v1.ip</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">api.v1.settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="subnet.html">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ufw.html">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="websocket.html">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/network.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.network">
|
||||
<span id="api-v1-network"></span><h1>api.v1.network<a class="headerlink" href="#module-api.v1.network" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="api.v1.network.ContainerPositionManager">
|
||||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.network.</span></span><span class="sig-name descname"><span class="pre">ContainerPositionManager</span></span><a class="reference internal" href="../../_modules/api/v1/network.html#ContainerPositionManager"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.network.ContainerPositionManager" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>Класс для управления позициями и состоянием контейнеров.</p>
|
||||
<p>Хранит и обновляет координаты (x, y) и состояние (isOpen) для контейнеров
|
||||
активации и деактивации.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="api.v1.network.ContainerPositionManager.get_position_and_state">
|
||||
<span class="sig-name descname"><span class="pre">get_position_and_state</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">container_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../_modules/api/v1/network.html#ContainerPositionManager.get_position_and_state"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.network.ContainerPositionManager.get_position_and_state" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Получает текущие координаты и состояние указанного контейнера.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>container_name (str): Имя контейнера (“activation” или “deactivation”).
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>Tuple[int, int, bool]: Кортеж с координатами (x, y) и состоянием (isOpen).</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>ValueError: Если указан неверный идентификатор контейнера.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="api.v1.network.ContainerPositionManager.update_position">
|
||||
<span class="sig-name descname"><span class="pre">update_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">container_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">isOpen</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference internal" href="../../_modules/api/v1/network.html#ContainerPositionManager.update_position"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.network.ContainerPositionManager.update_position" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Обновляет позицию и состояние контейнера по его идентификатору.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>container_id (int): Идентификатор контейнера (1 для “activation”, 2 для “deactivation”).
|
||||
x (int): Новая координата X.
|
||||
y (int): Новая координата Y.
|
||||
isOpen (bool): Новое состояние контейнера (открыт/закрыт).</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>ValueError: Если container_id не соответствует ни одному контейнеру.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.network.get_hostname">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.network.</span></span><span class="sig-name descname"><span class="pre">get_hostname</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/network.html#get_hostname"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.network.get_hostname" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Возвращает имя хоста системы.</p>
|
||||
<p>Выполняет запрос к сервису для получения имени хоста.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с ключом “hostname” и значением имени хоста.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка при получении имени хоста (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.network.get_network_data">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.network.</span></span><span class="sig-name descname"><span class="pre">get_network_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../_modules/api/v1/network.html#get_network_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.network.get_network_data" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Возвращает текущие сетевые данные в виде словаря.</p>
|
||||
<p>Получает данные о сетевых интерфейсах, разделяет их на активные и неактивные,
|
||||
и возвращает их в формате Activation и Deactivation с учётом позиций и состояний
|
||||
контейнеров.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>Dict[str, Dict]: Словарь с ключами “activation” и “deactivation”, содержащими</dt><dd><p>данные о соответствующих контейнерах.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка при получении данных (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.network.update_container_position">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.network.</span></span><span class="sig-name descname"><span class="pre">update_container_position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Body(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/network.html#update_container_position"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.network.update_container_position" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Обновляет позицию и состояние контейнера.</p>
|
||||
<p>Принимает данные о новом положении и состоянии контейнера и обновляет их
|
||||
в менеджере позиций.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>data (Dict[str, Union[int, bool]]): Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“container_id” (int): Идентификатор контейнера (1 или 2).</p></li>
|
||||
<li><p>“container_x” (int): Новая координата X.</p></li>
|
||||
<li><p>“container_y” (int): Новая координата Y.</p></li>
|
||||
<li><p>“isOpen” (bool): Новое состояние контейнера (открыт/закрыт).</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>dict: Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“success” (bool): Успешность операции.</p></li>
|
||||
<li><p>“message” (str): Сообщение об успешном обновлении.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если отсутствуют обязательные поля (status_code=400) или</dt><dd><p>типы данных неверны.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="settings.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">api.v1.settings</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="ip.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">api.v1.ip</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.network</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.network.ContainerPositionManager"><code class="docutils literal notranslate"><span class="pre">ContainerPositionManager</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.network.ContainerPositionManager.get_position_and_state"><code class="docutils literal notranslate"><span class="pre">ContainerPositionManager.get_position_and_state()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.network.ContainerPositionManager.update_position"><code class="docutils literal notranslate"><span class="pre">ContainerPositionManager.update_position()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#api.v1.network.get_hostname"><code class="docutils literal notranslate"><span class="pre">get_hostname()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.network.get_network_data"><code class="docutils literal notranslate"><span class="pre">get_network_data()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.network.update_container_position"><code class="docutils literal notranslate"><span class="pre">update_container_position()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
475
SRV/docs/_build/html/api/endpoints/settings.html
vendored
Normal file
475
SRV/docs/_build/html/api/endpoints/settings.html
vendored
Normal file
|
|
@ -0,0 +1,475 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="api.v1.subnet" href="subnet.html"><link rel="prev" title="api.v1.network" href="network.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.settings - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">api.v1.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ip.html">api.v1.ip</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="network.html">api.v1.network</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="subnet.html">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ufw.html">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="websocket.html">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/settings.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.settings">
|
||||
<span id="api-v1-settings"></span><h1>api.v1.settings<a class="headerlink" href="#module-api.v1.settings" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.clear_all_data">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">clear_all_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#clear_all_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.clear_all_data" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Очищает данные узлов подсети и точек доступа Wi-Fi в обоих файлах.</p>
|
||||
<p>Удаляет все записи из devices.json и wifi.json.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешной очистке.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка очистки (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.clear_subnet">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">clear_subnet</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">subnet</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#clear_subnet"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.clear_subnet" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Очищает данные узлов подсети, сохранённые в devices.json.</p>
|
||||
<p>Удаляет все записи об узлах подсети, оставляя файл пустым.</p>
|
||||
<dl>
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>subnet (Optional[str]): Подсеть в формате CIDR (например, “10.1.1.0/24”).</dt><dd><p>Если None, очищает все подсети.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешной очистке.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка очистки (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.clear_wifi">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">clear_wifi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#clear_wifi"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.clear_wifi" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Очищает данные точек доступа Wi-Fi, сохранённые в wifi.json.</p>
|
||||
<p>Удаляет все записи о точках доступа, оставляя файл пустым.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешной очистке.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка очистки (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.export_devices">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">export_devices</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/subnet.html#models.subnet.SubnetScanRequest" title="models.subnet.SubnetScanRequest"><span class="pre">SubnetScanRequest</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Body(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#export_devices"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.export_devices" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Экспортирует файл с данными устройств в формате JSON для указанной подсети.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (SubnetScanRequest): Объект с полем subnet в формате CIDR.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>FileResponse: Файл <subnet>.json для скачивания.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если файл не найден (status_code=404).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.export_wifi">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">export_wifi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#export_wifi"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.export_wifi" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Экспортирует файл с данными устройств в формате JSON.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>FileResponse: Файл wifi.json для скачивания.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если файл не найден (status_code=404).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.get_system_language">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">get_system_language</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#get_system_language"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.get_system_language" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Выводит текущий язык, установленный в системе на основе locale.</p>
|
||||
<p>Выполняет команду ‘locale’ в системе и извлекает параметры LANG</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (Request): Объект запроса для доступа к параметрам.
|
||||
translations: Объект переводов текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с текущим языком системы.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если не удалось извлечь системный язык (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.settings.set_language">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.settings.</span></span><span class="sig-name descname"><span class="pre">set_language</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Response</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/settings.html#set_language"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.settings.set_language" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Устанавливает куку locale для смены языка пользователя.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>locale (str): Используемый язык.
|
||||
response (Response): Запрос.
|
||||
translations: Объект переводов текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Сообщение об успешной установке языка.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="subnet.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">api.v1.subnet</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="network.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">api.v1.network</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.settings</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.settings.clear_all_data"><code class="docutils literal notranslate"><span class="pre">clear_all_data()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.settings.clear_subnet"><code class="docutils literal notranslate"><span class="pre">clear_subnet()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.settings.clear_wifi"><code class="docutils literal notranslate"><span class="pre">clear_wifi()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.settings.export_devices"><code class="docutils literal notranslate"><span class="pre">export_devices()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.settings.export_wifi"><code class="docutils literal notranslate"><span class="pre">export_wifi()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.settings.get_system_language"><code class="docutils literal notranslate"><span class="pre">get_system_language()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.settings.set_language"><code class="docutils literal notranslate"><span class="pre">set_language()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
579
SRV/docs/_build/html/api/endpoints/subnet.html
vendored
Normal file
579
SRV/docs/_build/html/api/endpoints/subnet.html
vendored
Normal file
|
|
@ -0,0 +1,579 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="api.v1.ufw" href="ufw.html"><link rel="prev" title="api.v1.settings" href="settings.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.subnet - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">api.v1.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ip.html">api.v1.ip</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="network.html">api.v1.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">api.v1.settings</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ufw.html">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="websocket.html">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/subnet.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.subnet">
|
||||
<span id="api-v1-subnet"></span><h1>api.v1.subnet<a class="headerlink" href="#module-api.v1.subnet" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.add_note">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">add_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mac</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/request.html#models.request.NoteRequest" title="models.request.NoteRequest"><span class="pre">NoteRequest</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">subnet_service</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../services/subnet_service.html#services.subnet_service.SubnetService" title="services.subnet_service.SubnetService"><span class="pre">SubnetService</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(get_subnet_service)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#add_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.add_note" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Добавляет заметку для устройства по MAC-адресу.</p>
|
||||
<p>Привязывает заметку к устройству, идентифицируемому по MAC-адресу.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>mac (str): MAC-адрес устройства.
|
||||
request (NoteRequest): Объект с полем “note” для текста заметки.
|
||||
subnet_service: Сервис сканирования подсети.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном добавлении заметки.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если устройство не найдено (status_code=404), заметка уже</dt><dd><p>существует (status_code=400), или произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.add_wifi_note">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">add_wifi_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ssid</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/request.html#models.request.NoteRequest" title="models.request.NoteRequest"><span class="pre">NoteRequest</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#add_wifi_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.add_wifi_note" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Добавляет заметку для сети Wi-Fi по SSID.</p>
|
||||
<p>Привязывает заметку к Wi-Fi сети, идентифицируемой по SSID.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>ssid (str): Идентификатор Wi-Fi сети.
|
||||
request (NoteRequest): Объект с полем “note” для текста заметки.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном добавлении заметки.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если сеть не найдена (status_code=404), заметка уже</dt><dd><p>существует (status_code=400), или произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.connect_to_wifi">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">connect_to_wifi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/request.html#models.request.WifiConnectRequest" title="models.request.WifiConnectRequest"><span class="pre">WifiConnectRequest</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#connect_to_wifi"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.connect_to_wifi" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Подключается к Wi-Fi сети по SSID и паролю.</p>
|
||||
<p>Выполняет подключение к указанной Wi-Fi сети с использованием предоставленных
|
||||
учетных данных.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (WifiConnectRequest): Объект с полями “ssid” и “password”.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном подключении.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если подключение не удалось (status_code=400).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.delete_note">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">delete_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mac</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">subnet_service</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../services/subnet_service.html#services.subnet_service.SubnetService" title="services.subnet_service.SubnetService"><span class="pre">SubnetService</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(get_subnet_service)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#delete_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.delete_note" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Удаляет заметку для устройства по MAC-адресу.</p>
|
||||
<p>Удаляет привязанную заметку для указанного устройства.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>mac (str): MAC-адрес устройства.
|
||||
subnet_service: Сервис сканирования подсети.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном удалении заметки.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если устройство не найдено (status_code=404), заметка не</dt><dd><p>существует (status_code=400), или произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.delete_wifi_note">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">delete_wifi_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ssid</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#delete_wifi_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.delete_wifi_note" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Удаляет заметку для сети Wi-Fi по SSID.</p>
|
||||
<p>Удаляет привязанную заметку для указанной Wi-Fi сети.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>ssid (str): Идентификатор Wi-Fi сети.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном удалении заметки.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если сеть не найдена (status_code=404), заметка не</dt><dd><p>существует (status_code=400), или произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.disconnect_from_wifi">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">disconnect_from_wifi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/request.html#models.request.WifiDisconnectRequest" title="models.request.WifiDisconnectRequest"><span class="pre">WifiDisconnectRequest</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#disconnect_from_wifi"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.disconnect_from_wifi" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Отключается от Wi-Fi сети по указанному SSID.</p>
|
||||
<p>Выполняет отключение от указанной Wi-Fi сети.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (WifiDisconnectRequest): Объект с полем “ssid”.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном отключении.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если отключение не удалось (status_code=400).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.get_wifi_status">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">get_wifi_status</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#get_wifi_status"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.get_wifi_status" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Проверяет статус текущего подключения к Wi-Fi.</p>
|
||||
<p>Возвращает информацию о текущем состоянии подключения и SSID, если подключение активно.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><dl class="simple">
|
||||
<dt>dict: Словарь с ключами:</dt><dd><ul class="simple">
|
||||
<li><p>“status” (str): Состояние (“connected” или другое).</p></li>
|
||||
<li><p>“ssid” (str, optional): SSID текущей сети, если подключено.</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если проверка статуса не удалась (status_code=400).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.scan_subnet">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">scan_subnet</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/subnet.html#models.subnet.SubnetScanRequest" title="models.subnet.SubnetScanRequest"><span class="pre">SubnetScanRequest</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Body(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">subnet_service</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../services/subnet_service.html#services.subnet_service.SubnetService" title="services.subnet_service.SubnetService"><span class="pre">SubnetService</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(get_subnet_service)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#scan_subnet"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.scan_subnet" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Сканирует локальную подсеть и возвращает данные об устройствах.</p>
|
||||
<p>Выполняет сканирование указанной подсети для обнаружения активных устройств.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>request (SubnetScanRequest): Объект с полем subnet.
|
||||
subnet_service: Сервис сканирования подсети.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>SubnetScanResult: Объект с результатами сканирования (устройства и их данные).</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка сканирования (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.scan_wifi">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">scan_wifi</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">30</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#scan_wifi"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.scan_wifi" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Сканирует Wi-Fi точки доступа и возвращает данные о них.</p>
|
||||
<p>Выполняет сканирование доступных Wi-Fi сетей с указанным таймаутом.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>timeout (int, optional): Таймаут сканирования в секундах. По умолчанию 30.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>WifiScanResult: Объект с результатами сканирования (список Wi-Fi сетей).</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если произошла ошибка сканирования Wi-Fi (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.update_note">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">update_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mac</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/request.html#models.request.NoteRequest" title="models.request.NoteRequest"><span class="pre">NoteRequest</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">subnet_service</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../services/subnet_service.html#services.subnet_service.SubnetService" title="services.subnet_service.SubnetService"><span class="pre">SubnetService</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(get_subnet_service)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#update_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.update_note" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Обновляет заметку для устройства по MAC-адресу.</p>
|
||||
<p>Изменяет существующую заметку, привязанную к устройству.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>mac (str): MAC-адрес устройства.
|
||||
request (NoteRequest): Объект с полем “note” для нового текста заметки.
|
||||
subnet_service: Сервис сканирования подсети.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном обновлении заметки.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если устройство не найдено (status_code=404), заметка не</dt><dd><p>существует (status_code=400), или произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.subnet.update_wifi_note">
|
||||
<span class="sig-prename descclassname"><span class="pre">api.v1.subnet.</span></span><span class="sig-name descname"><span class="pre">update_wifi_note</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ssid</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../models/request.html#models.request.NoteRequest" title="models.request.NoteRequest"><span class="pre">NoteRequest</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/subnet.html#update_wifi_note"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.subnet.update_wifi_note" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Обновляет заметку для сети Wi-Fi по SSID.</p>
|
||||
<p>Изменяет существующую заметку, привязанную к Wi-Fi сети.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>ssid (str): Идентификатор Wi-Fi сети.
|
||||
request (NoteRequest): Объект с полем “note” для нового текста заметки.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с сообщением об успешном обновлении заметки.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><dl class="simple">
|
||||
<dt>HTTPException: Если сеть не найдена (status_code=404), заметка не</dt><dd><p>существует (status_code=400), или произошла внутренняя ошибка (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="ufw.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">api.v1.ufw</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="settings.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">api.v1.settings</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.subnet</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.add_note"><code class="docutils literal notranslate"><span class="pre">add_note()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.add_wifi_note"><code class="docutils literal notranslate"><span class="pre">add_wifi_note()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.connect_to_wifi"><code class="docutils literal notranslate"><span class="pre">connect_to_wifi()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.delete_note"><code class="docutils literal notranslate"><span class="pre">delete_note()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.delete_wifi_note"><code class="docutils literal notranslate"><span class="pre">delete_wifi_note()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.disconnect_from_wifi"><code class="docutils literal notranslate"><span class="pre">disconnect_from_wifi()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.get_wifi_status"><code class="docutils literal notranslate"><span class="pre">get_wifi_status()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.scan_subnet"><code class="docutils literal notranslate"><span class="pre">scan_subnet()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.scan_wifi"><code class="docutils literal notranslate"><span class="pre">scan_wifi()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.update_note"><code class="docutils literal notranslate"><span class="pre">update_note()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.subnet.update_wifi_note"><code class="docutils literal notranslate"><span class="pre">update_wifi_note()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
492
SRV/docs/_build/html/api/endpoints/ufw.html
vendored
Normal file
492
SRV/docs/_build/html/api/endpoints/ufw.html
vendored
Normal file
|
|
@ -0,0 +1,492 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="api.v1.websocket" href="websocket.html"><link rel="prev" title="api.v1.subnet" href="subnet.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.ufw - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">api.v1.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ip.html">api.v1.ip</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="network.html">api.v1.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">api.v1.settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="subnet.html">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="websocket.html">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/ufw.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.ufw">
|
||||
<span id="api-v1-ufw"></span><h1>api.v1.ufw<a class="headerlink" href="#module-api.v1.ufw" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.RuleNumbers">
|
||||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">RuleNumbers</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="keyword-only-separator o"><abbr title="Keyword-only parameters separator (PEP 3102)"><span class="pre">*</span></abbr></span></em>, <em class="sig-param"><span class="n"><span class="pre">numbers</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#RuleNumbers"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.RuleNumbers" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">BaseModel</span></code></p>
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.RuleNumbers.model_config">
|
||||
<span class="sig-name descname"><span class="pre">model_config</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">ClassVar</span><span class="p"><span class="pre">[</span></span><span class="pre">ConfigDict</span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></em><a class="headerlink" href="#api.v1.ufw.RuleNumbers.model_config" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Configuration for the model, should be a dictionary conforming to [<cite>ConfigDict</cite>][pydantic.config.ConfigDict].</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.RuleNumbers.numbers">
|
||||
<span class="sig-name descname"><span class="pre">numbers</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#api.v1.ufw.RuleNumbers.numbers" title="Link to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.add_ufw_in_rules">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">add_ufw_in_rules</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rules</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="../models/ufw.html#models.ufw.UFWRule" title="models.ufw.UFWRule"><span class="pre">UFWRule</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#add_ufw_in_rules"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.add_ufw_in_rules" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Добавляет входящие (in) правила UFW.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>rules (List[UFWRule]): Список правил, определяющих направления,</dt><dd><p>порты/диапазоны/протоколы и действия (allow/deny/reject).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Итог выполнения с количеством успешно добавленных правил и деталями
|
||||
по каждому правилу.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если UFW отключен (status_code=400) или при внутренних
|
||||
ошибках (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.add_ufw_out_rules">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">add_ufw_out_rules</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rules</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="../models/ufw.html#models.ufw.UFWRule" title="models.ufw.UFWRule"><span class="pre">UFWRule</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#add_ufw_out_rules"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.add_ufw_out_rules" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Добавляет исходящие (out) правила UFW.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>rules (List[UFWRule]): Список правил исходящего трафика для добавления.</p>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Объект статуса с сообщением об успешном добавлении.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если UFW отключен (status_code=400) или при внутренних
|
||||
ошибках (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.delete_ufw_rules">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">delete_ufw_rules</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rule_numbers</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#api.v1.ufw.RuleNumbers" title="api.v1.ufw.RuleNumbers"><span class="pre">RuleNumbers</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#delete_ufw_rules"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.delete_ufw_rules" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Удаляет правила UFW по их номерам.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><dl class="simple">
|
||||
<dt>rule_numbers (RuleNumbers): Номера правил, подлежащих удалению (как в</dt><dd><p>выводе <cite>ufw status numbered</cite>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Returns:</dt><dd><p>dict: Информация об общем количестве удаляемых правил, числе успешных и
|
||||
возможной ошибке.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: При ошибках удаления (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.disable_ufw">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">disable_ufw</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#disable_ufw"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.disable_ufw" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Выключает UFW.</p>
|
||||
<dl class="simple">
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с ключами <cite>status</cite> и <cite>message</cite> при успешном выполнении.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если выключение завершилось неуспешно (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.enable_ufw">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">enable_ufw</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#enable_ufw"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.enable_ufw" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Включает UFW.</p>
|
||||
<dl class="simple">
|
||||
<dt>Returns:</dt><dd><p>dict: Словарь с ключами <cite>status</cite> и <cite>message</cite> при успешном выполнении.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если включение завершилось неуспешно (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.get_ufw_rules">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">get_ufw_rules</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#get_ufw_rules"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.get_ufw_rules" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Возвращает все правила UFW.</p>
|
||||
<p>Осуществляет обращение к сервису <cite>UFWService</cite> для чтения текущего списка
|
||||
правил брандмауэра и возвращает результат в сериализованном виде для клиента.</p>
|
||||
<dl class="simple">
|
||||
<dt>Returns:</dt><dd><p>UFWRulesResponse: Структура с коллекцией правил и сопутствующей
|
||||
информацией о состоянии.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: В случае ошибок взаимодействия с UFW (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.ufw.get_ufw_status">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.ufw.</span></span><span class="sig-name descname"><span class="pre">get_ufw_status</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/ufw.html#get_ufw_status"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.ufw.get_ufw_status" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Возвращает текущий статус UFW.</p>
|
||||
<dl class="simple">
|
||||
<dt>Returns:</dt><dd><p>UFWStatus: Объект со сведениями о включенности UFW и деталями статуса.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>HTTPException: Если не удалось получить статус (status_code=500).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="websocket.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">api.v1.websocket</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="subnet.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">api.v1.subnet</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.ufw</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.RuleNumbers"><code class="docutils literal notranslate"><span class="pre">RuleNumbers</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.RuleNumbers.model_config"><code class="docutils literal notranslate"><span class="pre">RuleNumbers.model_config</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.RuleNumbers.numbers"><code class="docutils literal notranslate"><span class="pre">RuleNumbers.numbers</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.add_ufw_in_rules"><code class="docutils literal notranslate"><span class="pre">add_ufw_in_rules()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.add_ufw_out_rules"><code class="docutils literal notranslate"><span class="pre">add_ufw_out_rules()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.delete_ufw_rules"><code class="docutils literal notranslate"><span class="pre">delete_ufw_rules()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.disable_ufw"><code class="docutils literal notranslate"><span class="pre">disable_ufw()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.enable_ufw"><code class="docutils literal notranslate"><span class="pre">enable_ufw()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.get_ufw_rules"><code class="docutils literal notranslate"><span class="pre">get_ufw_rules()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.ufw.get_ufw_status"><code class="docutils literal notranslate"><span class="pre">get_ufw_status()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
458
SRV/docs/_build/html/api/endpoints/websocket.html
vendored
Normal file
458
SRV/docs/_build/html/api/endpoints/websocket.html
vendored
Normal file
|
|
@ -0,0 +1,458 @@
|
|||
<!doctype html>
|
||||
<html class="no-js" lang="en" data-content_root="../../">
|
||||
<head><meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="index" title="Index" href="../../genindex.html"><link rel="search" title="Search" href="../../search.html"><link rel="next" title="Конфигурация" href="../config.html"><link rel="prev" title="api.v1.ufw" href="ufw.html">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25 -->
|
||||
<title>api.v1.websocket - GONETS SRV 0.0.3 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f2f2f2;
|
||||
--color-code-foreground: #1e1e1e;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
|
||||
<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
|
||||
<line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
|
||||
<line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
|
||||
<line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
|
||||
<line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
|
||||
<line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
|
||||
<line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
|
||||
<line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
|
||||
<circle cx="14.5" cy="9.55" r="3.6"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark, in dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="icon-custom-derived-from-feather-sun-and-tabler-moon">
|
||||
<path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
|
||||
<line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
|
||||
<line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
|
||||
<line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
|
||||
<line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
|
||||
<line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
|
||||
<circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-pencil" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
|
||||
<path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
|
||||
<path d="M13.5 6.5l4 4" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-eye" viewBox="0 0 24 24">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
|
||||
<path
|
||||
d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
|
||||
<path d="M20 21l2 -2l-2 -2" />
|
||||
<path d="M17 17l-2 2l2 2" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
|
||||
<label class="overlay sidebar-overlay" for="__navigation"></label>
|
||||
<label class="overlay toc-overlay" for="__toc"></label>
|
||||
|
||||
<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<span class="icon"><svg><use href="#svg-menu"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">GONETS SRV 0.0.3 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
<span class="sidebar-brand-text">GONETS SRV 0.0.3 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<p class="caption" role="heading"><span class="caption-text">Разделы</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../services.html">Сервисы</a><input aria-label="Toggle navigation of Сервисы" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/arp_service.html">ARP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/auth_service.html">Auth Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/connect_service.html">Connect Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/firewalld_service.html">Firewalld Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ip_service.html">IP Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/network_service.html">Network Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/settings_service.html">Settings Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/subnet_service.html">Subnet Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/ufw_service.html">UFW Service</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../services/wifi_service.html">Wifi Service</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../models.html">Модели</a><input aria-label="Toggle navigation of Модели" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/auth.html">models.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/network.html">models.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/request.html">models.request</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/subnet.html">models.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/ufw.html">models.ufw</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../models/wifi.html">models.wifi</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 current has-children"><a class="reference internal" href="../endpoints.html">API эндпоинты</a><input aria-label="Toggle navigation of API эндпоинты" checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="auth.html">api.v1.auth</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ip.html">api.v1.ip</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="network.html">api.v1.network</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">api.v1.settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="subnet.html">api.v1.subnet</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="ufw.html">api.v1.ufw</a></li>
|
||||
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">api.v1.websocket</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../config.html">Конфигурация</a><input aria-label="Toggle navigation of Конфигурация" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/cors.html">config.cors</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/init_config.html">config.init_config</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../config/ports.html">config.ports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../core.html">Core</a><input aria-label="Toggle navigation of Core" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../core/cli_executor.html">core.cli_executor</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../storage.html">Хранилища</a><input aria-label="Toggle navigation of Хранилища" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/json_storage.html">storage.json_storage</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../storage/session_storage.html">storage.session_storage</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1 has-children"><a class="reference internal" href="../utils.html">Утилиты</a><input aria-label="Toggle navigation of Утилиты" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="../utils/i18n.html">utils.i18n</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="view-this-page">
|
||||
<a class="muted-link" href="../../_sources/api/endpoints/websocket.rst.txt" title="View this page">
|
||||
<svg><use href="#svg-eye"></use></svg>
|
||||
<span class="visually-hidden">View this page</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
|
||||
<svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
|
||||
<svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||
<span class="icon"><svg><use href="#svg-toc"></use></svg></span>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main" id="furo-main-content">
|
||||
<section id="module-api.v1.websocket">
|
||||
<span id="api-v1-websocket"></span><h1>api.v1.websocket<a class="headerlink" href="#module-api.v1.websocket" title="Link to this heading">¶</a></h1>
|
||||
<dl class="py class">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.WebSocketManager">
|
||||
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.websocket.</span></span><span class="sig-name descname"><span class="pre">WebSocketManager</span></span><a class="reference internal" href="../../_modules/api/v1/websocket.html#WebSocketManager"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.WebSocketManager" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||||
<p>Класс для управления подключениями к WebSocket-серверу.</p>
|
||||
<p>Обрабатывает подключение, отключение и трансляцию сообщений для клиентов,
|
||||
подключённых через WebSocket.</p>
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.WebSocketManager.broadcast">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">broadcast</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">message</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/websocket.html#WebSocketManager.broadcast"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.WebSocketManager.broadcast" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Транслирует сообщения всем подключённым клиентам.</p>
|
||||
<p>Отправляет JSON-данные всем активным соединениям, обрабатывая
|
||||
отключения клиентов.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>message (dict): Сообщение для трансляции в формате JSON.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>WebSocketDisconnect: Если клиент неожиданно отключился.
|
||||
Exception: Если произошла другая ошибка при отправке.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.WebSocketManager.connect">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">connect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">websocket</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">WebSocket</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/websocket.html#WebSocketManager.connect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.WebSocketManager.connect" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Подключает клиента к WebSocket-серверу.</p>
|
||||
<p>Принимает подключение и добавляет WebSocket в список активных соединений.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>websocket (WebSocket): Объект WebSocket для подключения.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>Exception: Если произошла ошибка при принятии подключения.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.WebSocketManager.disconnect">
|
||||
<span class="sig-name descname"><span class="pre">disconnect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">websocket</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">WebSocket</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/websocket.html#WebSocketManager.disconnect"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.WebSocketManager.disconnect" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Отключает клиента от WebSocket-серверу.</p>
|
||||
<p>Удаляет WebSocket из списка активных соединений.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>websocket (WebSocket): Объект WebSocket для отключения.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.broadcast_data">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.websocket.</span></span><span class="sig-name descname"><span class="pre">broadcast_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/websocket.html#broadcast_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.broadcast_data" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Таск для периодической трансляции сетевых данных.</p>
|
||||
<p>Выполняет сканирование сети и отправляет данные всем подключённым клиентам
|
||||
с интервалом в 2 секунды.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>Exception: Если произошла ошибка при получении данных или трансляции.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.startup_event">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.websocket.</span></span><span class="sig-name descname"><span class="pre">startup_event</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/websocket.html#startup_event"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.startup_event" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Запуск таска для трансляции сетевых данных при старте приложения.</p>
|
||||
<p>Создаёт асинхронную задачу для периодической трансляции данных.</p>
|
||||
<dl class="simple">
|
||||
<dt>Raises:</dt><dd><p>Exception: Если произошла ошибка при запуске таска.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="api.v1.websocket.websocket_endpoint">
|
||||
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">api.v1.websocket.</span></span><span class="sig-name descname"><span class="pre">websocket_endpoint</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">websocket</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">WebSocket</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Translations</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Depends(translations_dependency)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/api/v1/websocket.html#websocket_endpoint"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#api.v1.websocket.websocket_endpoint" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Обработчик WebSocket-соединения.</p>
|
||||
<p>Управляет соединением клиента, принимает данные для обновления позиций
|
||||
контейнеров и транслирует сетевые данные.</p>
|
||||
<dl class="simple">
|
||||
<dt>Args:</dt><dd><p>websocket (WebSocket): Объект WebSocket для обработки соединения.
|
||||
translations: Объект переводов для текущего языка.</p>
|
||||
</dd>
|
||||
<dt>Raises:</dt><dd><p>WebSocketDisconnect: Если клиент отключился.
|
||||
Exception: Если произошла ошибка при обработке данных.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
<a class="next-page" href="../config.html">
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Next</span>
|
||||
</div>
|
||||
<div class="title">Конфигурация</div>
|
||||
</div>
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
</a>
|
||||
<a class="prev-page" href="ufw.html">
|
||||
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||
<div class="page-info">
|
||||
<div class="context">
|
||||
<span>Previous</span>
|
||||
</div>
|
||||
|
||||
<div class="title">api.v1.ufw</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2025, GONETS
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<aside class="toc-drawer">
|
||||
|
||||
|
||||
<div class="toc-sticky toc-scroll">
|
||||
<div class="toc-title-container">
|
||||
<span class="toc-title">
|
||||
On this page
|
||||
</span>
|
||||
</div>
|
||||
<div class="toc-tree-container">
|
||||
<div class="toc-tree">
|
||||
<ul>
|
||||
<li><a class="reference internal" href="#">api.v1.websocket</a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.WebSocketManager"><code class="docutils literal notranslate"><span class="pre">WebSocketManager</span></code></a><ul>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.WebSocketManager.broadcast"><code class="docutils literal notranslate"><span class="pre">WebSocketManager.broadcast()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.WebSocketManager.connect"><code class="docutils literal notranslate"><span class="pre">WebSocketManager.connect()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.WebSocketManager.disconnect"><code class="docutils literal notranslate"><span class="pre">WebSocketManager.disconnect()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.broadcast_data"><code class="docutils literal notranslate"><span class="pre">broadcast_data()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.startup_event"><code class="docutils literal notranslate"><span class="pre">startup_event()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#api.v1.websocket.websocket_endpoint"><code class="docutils literal notranslate"><span class="pre">websocket_endpoint()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="../../_static/documentation_options.js?v=47de8214"></script>
|
||||
<script src="../../_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue