Documentation
¶
Overview ¶
Package technitium implements a DNS record management client compatible with the libdns interfaces for Technitium DNS Server. It uses the Technitium HTTP API (not TSIG) for DNS challenge management.
Index ¶
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (*Provider) CaddyModule() caddy.ModuleInfo
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) Provision(ctx caddy.Context) error
- func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// ServerURL is the base URL of the Technitium DNS server,
// e.g. "http://dns.example.com:5380"
ServerURL string `json:"server_url"`
// APIToken is the Technitium API token (created in the web UI under Settings > API).
// This is used instead of TSIG — all requests are authenticated via this token.
APIToken string `json:"api_token"`
// StaleRecordTimeout is how old an _acme-challenge TXT record must be
// before it is considered stale and automatically cleaned up.
// Set to 0 to disable stale record cleanup. Default: 15 minutes.
StaleRecordTimeout time.Duration `json:"stale_record_timeout,omitempty"`
// contains filtered or unexported fields
}
Provider facilitates DNS record manipulation with Technitium DNS Server.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone. It returns the records that were added. Before adding _acme-challenge TXT records, it cleans up any stale challenge records that are older than StaleRecordTimeout.
func (*Provider) CaddyModule ¶
func (*Provider) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the records from the zone. It returns the records that were deleted.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.