mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-03-17 14:26:18 +00:00
21 lines
495 B
Python
21 lines
495 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class StaticRouteModel(BaseModel):
|
|
path_prefix: str
|
|
root: str
|
|
strip_prefix: str | None = None
|
|
cache_control: str | None = None
|
|
|
|
|
|
class ApplicationModel(BaseModel):
|
|
id: str
|
|
name: str
|
|
hosts: list[str] = Field(default_factory=list)
|
|
upstream: str
|
|
static_routes: list[StaticRouteModel] = Field(default_factory=list)
|
|
|
|
|
|
class ApplicationsFileModel(BaseModel):
|
|
entries: list[ApplicationModel] = Field(default_factory=list)
|