package dav // CommonOptions returns the CheckerOptionField descriptors shared by both // CalDAV and CardDAV checkers. Each checker composes them into its own // CheckerOptionsDocumentation alongside protocol-specific tweaks. // // Returning plain CheckerOptionField slices (from the SDK) keeps this package // free of any sdk import cycles: the caller already depends on the SDK. import ( sdk "git.happydns.org/checker-sdk-go/checker" ) // UserOptions are editable in the checker settings UI. func UserOptions() []sdk.CheckerOptionDocumentation { return []sdk.CheckerOptionDocumentation{ { Id: "username", Type: "string", Label: "Username", Description: "Optional. Supplying credentials unlocks authenticated checks (principal, home-set, collections, report probe).", }, { Id: "password", Type: "string", Label: "Password or token", Description: "Optional. Paired with the username for HTTP Basic authentication.", Secret: true, }, { Id: "context_url", Type: "string", Label: "Explicit context URL", Description: "Optional. Bypasses /.well-known and SRV discovery — use for servers with a non-standard layout.", Placeholder: "https://dav.example.com/caldav/", }, } } // DomainOptions are auto-filled per-domain by happyDomain. func DomainOptions() []sdk.CheckerOptionDocumentation { return []sdk.CheckerOptionDocumentation{ { Id: "domain_name", Label: "Domain name", AutoFill: sdk.AutoFillDomainName, }, } } // RunOptions are set at collect-time only. func RunOptions() []sdk.CheckerOptionDocumentation { return []sdk.CheckerOptionDocumentation{ { Id: "timeout_seconds", Type: "number", Label: "Timeout (seconds)", Description: "Per-request HTTP timeout.", Default: float64(10), }, } }