summaryrefslogtreecommitdiffstats
path: root/ttun_server/types.py
blob: 0b2fb8701454e87facc7e0c5d27bd0c5b9f44a64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from asyncio import Queue
from typing import TypedDict, Optional


class Config(TypedDict):
    subdomain: str

class RequestData(TypedDict):
    method: str
    path: str
    headers: dict
    cookies: dict
    body: Optional[str]


class ResponseData(TypedDict):
    status: int
    headers: dict
    cookies: dict
    body: Optional[str]


class Connection(TypedDict):
    requests: Queue[RequestData]
    responses: Queue[ResponseData]