-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
118 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
brotli-asgi | ||
cityhash | ||
fastapi | ||
fastavro | ||
|
@@ -6,4 +7,5 @@ orjson | |
orso | ||
pyarrow | ||
pydantic | ||
uvicorn | ||
zstandard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
from .audit_middleware import AuditMiddleware | ||
from .authorization_middleware import AuthorizationMiddleware | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from brotli_asgi import BrotliMiddleware | ||
from fastapi import FastAPI | ||
|
||
|
||
def bind(app: FastAPI): | ||
app.add_middleware(BrotliMiddleware) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from fastapi import FastAPI | ||
from fastapi.middleware.cors import CORSMiddleware | ||
|
||
allowed_origins_regex = "http(s)?:\/\/.(localhost|.*\.run\.app)(:\d{1,5})?$" | ||
|
||
|
||
def bind(app: FastAPI): | ||
app.add_middleware( | ||
CORSMiddleware, | ||
allow_origin_regex=allowed_origins_regex, | ||
allow_credentials=True, | ||
allow_methods=["*"], | ||
allow_headers=["*"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
""" | ||
/tables/{owner}/{table}/hooks | ||
/owners/{owner}/hooks | ||
/{hook_id}/ | ||
/{hook_id}/ping | ||
we only record the latest attempt | ||
""" | ||
|
||
from fastapi import APIRouter | ||
from fastapi import Request | ||
from fastapi.responses import ORJSONResponse | ||
|
||
router = APIRouter() | ||
|
||
|
||
@router.get("/tables/{owner}/{table}/hooks", response_class=ORJSONResponse) | ||
async def get_table_hooks(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.post("/tables/{owner}/{table}/hooks", response_class=ORJSONResponse) | ||
async def create_table_hooks(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.get("/tables/{owner}/{table}/hooks/{hook}", response_class=ORJSONResponse) | ||
async def get_table_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.patch("/tables/{owner}/{table}/hooks/{hook}", response_class=ORJSONResponse) | ||
async def update_table_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.delete("/tables/{owner}/{table}/hooks/{hook}", response_class=ORJSONResponse) | ||
async def delete_table_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.get("/tables/{owner}/{table}/hooks/{hook}/ping", response_class=ORJSONResponse) | ||
async def ping_table_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.get("/owner/{owner}/hooks", response_class=ORJSONResponse) | ||
async def get_owner_hooks(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.post("/owner/{owner}/hooks", response_class=ORJSONResponse) | ||
async def create_owner_hooks(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.get("/owner/{owner}/hooks/{hook}", response_class=ORJSONResponse) | ||
async def get_owner_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.patch("/owner/{owner}/hooks/{hook}", response_class=ORJSONResponse) | ||
async def update_owner_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.delete("/owner/{owner}/hooks/{hook}", response_class=ORJSONResponse) | ||
async def delete_owner_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") | ||
|
||
|
||
@router.get("/owner/{owner}/hooks/{hook}/ping", response_class=ORJSONResponse) | ||
async def ping_owner_hooks_by_id(request: Request, owner: str): | ||
raise NotImplementedError("Not Implemented") |
This file was deleted.
Oops, something went wrong.