18 lines
625 B
Python
18 lines
625 B
Python
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class ServiceEndpointDocument(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
host: str = Field(default="127.0.0.1", description="Upstream service host")
|
|
port: int = Field(..., description="Original upstream service port")
|
|
name: str | None = Field(default=None, description="Docker Compose service name")
|
|
folder: str | None = Field(
|
|
default=None,
|
|
description="Docker Compose project folder",
|
|
)
|
|
upstream_port: int | None = Field(
|
|
default=None,
|
|
description="Current port used by mitmdump as upstream",
|
|
)
|