@startuml repoerparser

!include ../domain/aggregates/problem_meta_report_details.puml

package ReportParser {
    interface Parser {
        + ReadReport(reader io.Reader) ([]ProblemMetaReportAggregate, error)
    }

    class CodeScoringParser
    class KasperskyParser
    class StingrayParser
    class ZapParser
    class PTParser
    class SolarParser

    Parser <|.. CodeScoringParser
    Parser <|.. KasperskyParser
    Parser <|.. StingrayParser
    Parser <|.. ZapParser
    Parser <|.. PTParser
    Parser <|.. SolarParser

    Parser o-- ProblemMetaReportAggregate
}

package Sender {

    interface ProblemSender {
        + SendProblem(problem ProblemMetaReportAggregate) error
        + SendProblems(problems []ProblemMetaReportAggregate) error
    }

    class KafkaSender {
        + Address string
    }

    ProblemSender <|.. KafkaSender
    ProblemSender o-- ProblemMetaReportAggregate
}


class ReportParserService{
    + SetParser(parser Praser)
    + SetSender(sender ProblemSender)
    + MetricsHandler(ResponseWriter, *Request)
    + HealthCheckHandler(ResponseWriter, *Request)
}

ReportParserService o-- Parser
ReportParserService o-- ProblemSender

@enduml