22 lines
782 B
Go
22 lines
782 B
Go
// Command plugin is the happyDomain plugin entrypoint for the
|
|
// OPENPGPKEY/SMIMEA checker. Built as a Go plugin and loaded at runtime
|
|
// by happyDomain.
|
|
package main
|
|
|
|
import (
|
|
emailkeys "git.happydns.org/checker-email-keys/checker"
|
|
sdk "git.happydns.org/checker-sdk-go/checker"
|
|
)
|
|
|
|
// Version is the plugin's version, meant to be overridden by CI:
|
|
//
|
|
// go build -buildmode=plugin -ldflags "-X main.Version=1.2.3" -o checker-email-keys.so ./plugin
|
|
var Version = "custom-build"
|
|
|
|
// NewCheckerPlugin is the symbol resolved by happyDomain when loading
|
|
// the .so file.
|
|
func NewCheckerPlugin() (*sdk.CheckerDefinition, sdk.ObservationProvider, error) {
|
|
emailkeys.Version = Version
|
|
prvd := emailkeys.Provider()
|
|
return prvd.(sdk.CheckerDefinitionProvider).Definition(), prvd, nil
|
|
}
|