Fastapi refactor update
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
from abc import ABC
|
||||
|
||||
|
||||
class IDocumentStore(ABC):
|
||||
|
||||
async def save_to_db(self, collection: str, item):
|
||||
pass
|
||||
|
||||
async def save_to_db_with_id(self, collection: str, item, id: str):
|
||||
pass
|
||||
|
||||
async def get_all(self, collection: str):
|
||||
pass
|
||||
|
||||
async def get_doc_by_id(self, collection: str, doc_id: str):
|
||||
pass
|
||||
from abc import ABC
|
||||
|
||||
from typing import Dict, Optional, List
|
||||
|
||||
|
||||
class IDocumentStore(ABC):
|
||||
|
||||
async def save_to_db(self, collection: str, item: Dict, doc_id: Optional[str]) -> Optional[str]:
|
||||
pass
|
||||
|
||||
async def get_all(self, collection: str) -> List[Dict]:
|
||||
pass
|
||||
|
||||
async def get_doc_by_id(self, collection: str, doc_id: str) -> Optional[Dict]:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user