Initial commit
This commit is contained in:
commit
1b4dacff1f
23 changed files with 1843 additions and 0 deletions
68
checker/definition.go
Normal file
68
checker/definition.go
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
package checker
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
sdk "git.happydns.org/checker-sdk-go/checker"
|
||||
tls "git.happydns.org/checker-tls/checker"
|
||||
)
|
||||
|
||||
// Version defaults to "built-in"; standalone and plugin builds override it
|
||||
// via -ldflags "-X .../checker.Version=...".
|
||||
var Version = "built-in"
|
||||
|
||||
// serviceType is the happyDomain service type this checker binds to.
|
||||
const serviceType = "svcs.TLSAs"
|
||||
|
||||
// Definition satisfies sdk.CheckerDefinitionProvider.
|
||||
func (p *daneProvider) Definition() *sdk.CheckerDefinition {
|
||||
return &sdk.CheckerDefinition{
|
||||
ID: "dane",
|
||||
Name: "DANE / TLSA",
|
||||
Version: Version,
|
||||
Availability: sdk.CheckerAvailability{
|
||||
ApplyToService: true,
|
||||
LimitToServices: []string{serviceType},
|
||||
},
|
||||
ObservationKeys: []sdk.ObservationKey{ObservationKeyDANE},
|
||||
HasHTMLReport: true,
|
||||
Options: sdk.CheckerOptionsDocumentation{
|
||||
UserOpts: []sdk.CheckerOptionDocumentation{
|
||||
{
|
||||
Id: OptionProbeTimeoutMs,
|
||||
Type: "number",
|
||||
Label: "Probe timeout (ms)",
|
||||
Description: "Forwarded to checker-tls for each DANE endpoint.",
|
||||
Default: float64(tls.DefaultProbeTimeoutMs),
|
||||
},
|
||||
},
|
||||
RunOpts: []sdk.CheckerOptionDocumentation{
|
||||
{
|
||||
Id: OptionDomain,
|
||||
Type: "string",
|
||||
Label: "Domain",
|
||||
AutoFill: sdk.AutoFillDomainName,
|
||||
Required: true,
|
||||
},
|
||||
{
|
||||
Id: OptionSubdomain,
|
||||
Type: "string",
|
||||
Label: "Subdomain",
|
||||
AutoFill: sdk.AutoFillSubdomain,
|
||||
},
|
||||
{
|
||||
Id: OptionService,
|
||||
Label: "TLSAs service",
|
||||
AutoFill: sdk.AutoFillService,
|
||||
Hide: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
Rules: Rules(),
|
||||
Interval: &sdk.CheckIntervalSpec{
|
||||
Min: 6 * time.Hour,
|
||||
Max: 7 * 24 * time.Hour,
|
||||
Default: 24 * time.Hour,
|
||||
},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue