Island: Add IAgentBinaryRepository

Issue #1974
This commit is contained in:
Ilija Lazoroski 2022-06-06 14:12:37 +02:00 committed by Mike Salvatore
parent ae78ed7931
commit 4e520c135f
2 changed files with 25 additions and 0 deletions

View File

@ -1 +1,2 @@
from .file_storage import FileRetrievalError, IFileRepository, LocalStorageFileRepository
from .i_agent_binary_repository import IAgentBinaryRepository

View File

@ -0,0 +1,24 @@
import abc
from typing import BinaryIO
class IAgentBinaryRepository(metaclass=abc.ABCMeta):
"""
A repository that retrieves the agent binaries
"""
@abc.abstractmethod
def get_linux_binary(self) -> BinaryIO:
"""
Retrieve linux agent binary
:return: A file-like object that represents the linux agent binary
"""
@abc.abstractmethod
def get_windows_binary(self) -> BinaryIO:
"""
Retrieve windows agent binary
:return: A file-like object that represents the windows agent binary
"""