diff options
| author | 2021-12-30 10:16:41 +0100 | |
|---|---|---|
| committer | 2022-01-09 13:00:48 +0100 | |
| commit | 46af86f8ace136dd1d1d94590d3423e6b12e3f7b (patch) | |
| tree | f190663cd8202c7bc7034adbf9dabd7da293082c /ttun_server/types.py | |
| download | server-1.0.0.tar.gz server-1.0.0.tar.bz2 server-1.0.0.zip | |
Prepare for githubv1.0.0
Diffstat (limited to 'ttun_server/types.py')
| -rw-r--r-- | ttun_server/types.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ttun_server/types.py b/ttun_server/types.py new file mode 100644 index 0000000..0b2fb87 --- /dev/null +++ b/ttun_server/types.py | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | from asyncio import Queue | ||
| 2 | from typing import TypedDict, Optional | ||
| 3 | |||
| 4 | |||
| 5 | class Config(TypedDict): | ||
| 6 | subdomain: str | ||
| 7 | |||
| 8 | class RequestData(TypedDict): | ||
| 9 | method: str | ||
| 10 | path: str | ||
| 11 | headers: dict | ||
| 12 | cookies: dict | ||
| 13 | body: Optional[str] | ||
| 14 | |||
| 15 | |||
| 16 | class ResponseData(TypedDict): | ||
| 17 | status: int | ||
| 18 | headers: dict | ||
| 19 | cookies: dict | ||
| 20 | body: Optional[str] | ||
| 21 | |||
| 22 | |||
| 23 | class Connection(TypedDict): | ||
| 24 | requests: Queue[RequestData] | ||
| 25 | responses: Queue[ResponseData] | ||
