Initial commit
CalDAV and CardDAV checkers sharing a single Go module. Discovery follows RFC 6764 (/.well-known + SRV/TXT), authenticated probes cover principal, home-set, collections and a minimal REPORT query on top of go-webdav. Common shape in internal/dav/; CalDAV adds a scheduling rule. Surfaces its context URL (and each secure-SRV target) as TLS endpoints via the EndpointDiscoverer interface, so the dedicated TLS checker can pick them up without re-parsing observations. HTML report foregrounds common misconfigs (well-known returning 200, missing SRV, plaintext-only SRV, missing DAV capability, skipped auth phase) as action-item callouts before the full phase breakdown.
This commit is contained in:
commit
4366ca9058
39 changed files with 3324 additions and 0 deletions
29
caldav/report.go
Normal file
29
caldav/report.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package caldav
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
sdk "git.happydns.org/checker-sdk-go/checker"
|
||||
|
||||
"git.happydns.org/checker-dav/internal/dav"
|
||||
)
|
||||
|
||||
// GetHTMLReport implements sdk.CheckerHTMLReporter on *caldavProvider.
|
||||
//
|
||||
// Delegated to the shared renderer in internal/dav so CalDAV and CardDAV
|
||||
// produce visually identical reports; the only differences are the title
|
||||
// and the set of phases (CalDAV includes Scheduling).
|
||||
//
|
||||
// Downstream TLS probes published for the endpoints we discovered are read
|
||||
// via ctx.Related(dav.TLSRelatedKey) and folded into the report (callouts +
|
||||
// dedicated TLS phase), per
|
||||
// happydomain3/docs/checker-discovery-endpoint.md.
|
||||
func (p *caldavProvider) GetHTMLReport(ctx sdk.ReportContext) (string, error) {
|
||||
var d dav.Observation
|
||||
if err := json.Unmarshal(ctx.Data(), &d); err != nil {
|
||||
return "", fmt.Errorf("failed to unmarshal caldav report: %w", err)
|
||||
}
|
||||
d.Kind = dav.KindCalDAV
|
||||
return dav.RenderReport(&d, "CalDAV Server", ctx.Related(dav.TLSRelatedKey))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue