31 lines
606 B
Python
31 lines
606 B
Python
from analyzers.settings import LogSettings
|
|
|
|
|
|
class Result:
|
|
def __init__(self, analysis, result):
|
|
self.result = result
|
|
self.__analysis__ = analysis
|
|
|
|
def analysis(self):
|
|
return self.__analysis__
|
|
|
|
def get(self):
|
|
return self.result
|
|
|
|
def __repr__(self):
|
|
return "<Result " + str(self.__analysis__) + ": " + str(type(self.result)) + ">"
|
|
|
|
|
|
class Analyzer:
|
|
def __init__(self, settings: LogSettings):
|
|
self.settings = settings
|
|
|
|
def process(self, entry: dict) -> bool:
|
|
raise NotImplementedError()
|
|
|
|
def result(self) -> Result:
|
|
raise NotImplementedError()
|
|
|
|
def name(self):
|
|
return self.__name__
|