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 is a signature migration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
nemunaire 2026-04-19 23:36:04 +07:00
commit c69e22fdfe

View file

@ -5,6 +5,8 @@ import (
"fmt" "fmt"
"html/template" "html/template"
"strings" "strings"
sdk "git.happydns.org/checker-sdk-go/checker"
) )
// reportData is the view-model fed to the HTML template. // reportData is the view-model fed to the HTML template.
@ -167,9 +169,9 @@ th{font-weight:600;color:#6b7280;background:#f9fafb}
</body> </body>
</html>`)) </html>`))
func (p *srvProvider) GetHTMLReport(raw json.RawMessage) (string, error) { func (p *srvProvider) GetHTMLReport(ctx sdk.ReportContext) (string, error) {
var d SRVData var d SRVData
if err := json.Unmarshal(raw, &d); err != nil { if err := json.Unmarshal(ctx.Data(), &d); err != nil {
return "", fmt.Errorf("failed to unmarshal SRV report: %w", err) return "", fmt.Errorf("failed to unmarshal SRV report: %w", err)
} }