added infrastructure code
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""Definition of AnnotationRepositoryInterface."""
|
||||
|
||||
from uuid import UUID
|
||||
from abc import ABC, abstractmethod
|
||||
from data_store.dto import Annotation
|
||||
|
||||
|
||||
class AnnotationRepositoryInterface(ABC):
|
||||
"""AnnotationRepository interface."""
|
||||
|
||||
@abstractmethod
|
||||
def get(self, job_id: UUID) -> Annotation | None:
|
||||
"""Retrieve an Annotation by its associated Job ID."""
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
def put(self, annotation: Annotation, job_id: UUID) -> None:
|
||||
"""Update or create an Annotation."""
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
def delete(self, job_id: UUID) -> None:
|
||||
"""Delete an Annotation by its associated Job ID."""
|
||||
raise NotImplementedError()
|
||||
|
||||
@abstractmethod
|
||||
def list_all(self) -> list[UUID]:
|
||||
"""List all Job IDs with associated Annotations in the repository."""
|
||||
raise NotImplementedError()
|
||||
Reference in New Issue
Block a user