← Về thư mục
openai4s/server/share_router.py
- ShareRouter · class · L64-L309 — class ShareRouter
- init · method · L65-L67 — def init(self, service: ShareService, assets: dict[str, bytes]) -> None
- handle · method · L70-L96 — def handle(self, request: dict[str, Any]) -> dict[str, Any]
- release · function · L83-L84 — def release()
- _route · method · L99-L124 — def _route( self, method: str, path: str, request: dict[str, Any], snap_dir: Path ) -> dict[str, Any]
- _asset_response · method · L126-L144 — def _asset_response( self, method: str, name: str, *, ctype: str, csp: bool = False ) -> dict[str, Any]
- _snapshot_file · method · L146-L161 — def _snapshot_file( self, method: str, snap_dir: Path, name: str, ctype: str ) -> dict[str, Any]
- _artifact · method · L163-L182 — def _artifact( self, method: str, request: dict[str, Any], snap_dir: Path, sha: str ) -> dict[str, Any]
- _bundle · method · L184-L203 — def _bundle( self, method: str, request: dict[str, Any], snap_dir: Path ) -> dict[str, Any]
- _file_body · method · L206-L242 — def _file_body( self, method: str, request: dict[str, Any], target: Path, headers: dict[str, str], ) -> dict[str, Any]
- _parse_range · method · L245-L266 — def _parse_range(request: dict[str, Any], size: int) -> tuple[int, int] | None
- _artifact_meta · method · L269-L277 — def _artifact_meta(self, snap_dir: Path, sha: str) -> tuple[str, str]
- _read_json · method · L280-L284 — def _read_json(path: Path) -> dict | None
- _safe_join · method · L287-L294 — def _safe_join(base: Path, name: str) -> Path | None
- _not_found · method · L296-L301 — def _not_found(self) -> dict[str, Any]
- _error · method · L303-L309 — def _error(self, status: int, message: str) -> dict[str, Any]
- _LeasedStream · class · L312-L334 — class _LeasedStream
- init · method · L315-L319 — def init(self, path: Path, start: int, length: int) -> None
- iter · method · L321-L334 — def iter(self) -> Iterator[bytes]
- _asset_ctype · function · L337-L344 — def _asset_ctype(name: str) -> str