feat: define caddy module
This commit is contained in:
parent
1b01ff4079
commit
1e595f787c
2 changed files with 61 additions and 0 deletions
23
stub.go
23
stub.go
|
|
@ -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{}},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue