Documentation
¶
Overview ¶
Package simplydotcom implements a Caddy DNS provider module for Simply.com, wrapping github.com/libdns/simplydotcom.
Index ¶
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
- func (Provider) CaddyModule() caddy.ModuleInfo
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, recs []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, recs []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 {
// APIKey is the Simply.com API key. Supports placeholders such as
// {env.SIMPLY_API_KEY}. Required.
APIKey string `json:"api_key,omitempty"`
// MaxRetries is how many times a rate-limited (HTTP 429) request is
// retried. Must be positive if set. Defaults to the library default (3).
MaxRetries int `json:"max_retries,omitempty"`
// contains filtered or unexported fields
}
Provider lets Caddy solve ACME DNS-01 challenges for zones hosted at Simply.com.
The API endpoint is deliberately not configurable: a redirectable endpoint in the certificate path would let a config change send the API key to a third party. Unknown JSON fields (such as base_url) are rejected by Caddy's strict config decoding.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone and returns the records added.
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, recs []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes matching records from the zone.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.
func (*Provider) Provision ¶
Provision resolves placeholders, validates the config and builds the underlying libdns provider.
func (*Provider) SetRecords ¶
func (p *Provider) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
SetRecords sets the records in the zone, creating or updating as needed.
func (*Provider) UnmarshalCaddyfile ¶
UnmarshalCaddyfile sets up the provider from Caddyfile tokens. Syntax:
simplydotcom [<api_key>] {
api_key <api_key>
max_retries <n>
}
The API key must be given exactly once, either inline or in the block.