checker: adopt unified ReportContext reporter signature

Follow the checker-sdk-go interface consolidation: reporter methods
now take sdk.ReportContext and read the payload via ctx.Data() instead
of the raw json.RawMessage parameter. Backed by the same underlying
logic.
This commit is contained in:
nemunaire 2026-04-19 23:36:04 +07:00
commit df3d29f484

View file

@ -5,6 +5,8 @@ import (
"fmt"
"html/template"
"strings"
sdk "git.happydns.org/checker-sdk-go/checker"
)
// ── HTML report ───────────────────────────────────────────────────────────────
@ -287,9 +289,9 @@ li { margin-bottom: .15rem; }
)
// GetHTMLReport implements sdk.CheckerHTMLReporter.
func (p *matrixProvider) GetHTMLReport(raw json.RawMessage) (string, error) {
func (p *matrixProvider) GetHTMLReport(ctx sdk.ReportContext) (string, error) {
var r MatrixFederationData
if err := json.Unmarshal(raw, &r); err != nil {
if err := json.Unmarshal(ctx.Data(), &r); err != nil {
return "", fmt.Errorf("failed to unmarshal matrix report: %w", err)
}