feat: define caddy module

This commit is contained in:
xaos 2023-02-25 10:30:08 +01:00
parent 1b01ff4079
commit 1e595f787c
2 changed files with 61 additions and 0 deletions

23
stub.go
View file

@ -1 +1,24 @@
package stub
import (
"github.com/caddyserver/caddy/v2"
)
type StubDNS struct {
// the address & port on which to serve DNS for the challenge
Address string `json:"address,omitempty"`
}
func init() {
caddy.RegisterModule(StubDNS{})
}
// CaddyModule returns the Caddy module information.
func (StubDNS) CaddyModule() caddy.ModuleInfo {
return caddy.ModuleInfo{
ID: "dns.providers.stub_dns",
New: func() caddy.Module {return &StubDNS{}},
}
}