chore: restructure project directory and update Dockerfile paths
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/proxy",
|
||||
tags=["Proxy"]
|
||||
)
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def list_proxies():
|
||||
return
|
||||
|
||||
|
||||
@router.post("/")
|
||||
async def create_proxy():
|
||||
return
|
||||
|
||||
|
||||
@router.put("/{proxy_port}/")
|
||||
async def edit_proxy():
|
||||
return
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
from api.proxy import router as proxy_router
|
||||
|
||||
app = FastAPI(
|
||||
title="thePlugAPI"
|
||||
)
|
||||
|
||||
app.include_router(proxy_router)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"Hello": "World!"}
|
||||
@@ -0,0 +1,10 @@
|
||||
from utils.proxy.types import ServiceConfig
|
||||
|
||||
|
||||
async def create_proxy(
|
||||
port: int,
|
||||
name: str,
|
||||
service: ServiceConfig,
|
||||
code: str
|
||||
):
|
||||
return
|
||||
@@ -0,0 +1,6 @@
|
||||
from typing import TypedDict
|
||||
|
||||
|
||||
class ServiceConfig(TypedDict):
|
||||
address: str
|
||||
port: int
|
||||
Reference in New Issue
Block a user