20 lines
590 B
Python
20 lines
590 B
Python
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
from app.schemas.software_a import CreateDeployTaskRequest
|
|
|
|
|
|
class SoftwareAAdapter(ABC):
|
|
@abstractmethod
|
|
def create_deploy_task(self, payload: CreateDeployTaskRequest) -> dict:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def get_deploy_task(self, software_a_task_id: str) -> dict | None:
|
|
raise NotImplementedError
|
|
|
|
@abstractmethod
|
|
def check_permission(self, action_type: str, env: str, approval_status: str | None = None) -> tuple[bool, str]:
|
|
raise NotImplementedError
|