sync
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class KeyDTO:
|
||||
key: str
|
||||
val: str | None = None
|
||||
val: Any | None = None
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from abc import abstractmethod
|
||||
from typing import Protocol
|
||||
|
||||
from protocols.models import KeyDTO
|
||||
from flask_demo_api.protocols.models import KeyDTO
|
||||
|
||||
|
||||
class Repository(Protocol):
|
||||
@@ -16,3 +16,7 @@ class Repository(Protocol):
|
||||
@abstractmethod
|
||||
def put_key(self, obj: KeyDTO) -> KeyDTO:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def delete_key(self, obj: KeyDTO) -> None:
|
||||
raise NotImplementedError
|
||||
|
Reference in New Issue
Block a user