package caldav import ( "time" "git.happydns.org/checker-dav/internal/dav" sdk "git.happydns.org/checker-sdk-go/checker" ) // Version is the checker version reported in CheckerDefinition.Version. // Overridden at link time by the standalone binary via -ldflags. var Version = "built-in" // Definition returns the CheckerDefinition for the CalDAV checker. func Definition() *sdk.CheckerDefinition { return &sdk.CheckerDefinition{ ID: "caldav", Name: "CalDAV server", Version: Version, Availability: sdk.CheckerAvailability{ // The probe itself only needs a domain name (discovery runs on // the whole domain via /.well-known + SRV), so the checker is // always offered at domain scope. ApplyToDomain: true, // Also offered at service scope so alerts — including the TLS // alerts derived from the endpoints we publish — surface on a // dedicated "CalDAV" service page rather than on the domain // page. The abstract.CalDAV service type does not exist in the // happyDomain service catalog yet; until it does, this has no // visible effect, but makes the intent explicit. ApplyToService: true, LimitToServices: []string{"abstract.CalDAV"}, }, ObservationKeys: []sdk.ObservationKey{ObservationKey}, Options: sdk.CheckerOptionsDocumentation{ UserOpts: dav.UserOptions(), DomainOpts: dav.DomainOptions(), RunOpts: dav.RunOptions(), }, Rules: dav.Rules(dav.KindCalDAV, ObservationKey), Aggregator: dav.WorstStatus{}, Interval: &sdk.CheckIntervalSpec{ Min: 1 * time.Minute, Max: 1 * time.Hour, Default: 15 * time.Minute, }, HasHTMLReport: true, } }