Documentation
¶
Index ¶
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- 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) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// AccountName is no longer needed, as the API key identifies the account.
// It is ignored and only kept so that existing configurations keep working.
AccountName string `json:"account_name,omitempty"`
// APIKey is the API key for the Simply.com account. It is required.
APIKey string `json:"api_key,omitempty"`
// BaseURL is the base URL of the Simply.com API. Default is https://api.simply.com/2/
BaseURL string `json:"base_url,omitempty"`
// MaxRetries is the maximum number of retries if rate limiting occurs. Default is 3.
MaxRetries string `json:"max_retries,omitempty"`
// contains filtered or unexported fields
}
Provider implements the libdns interfaces for Simply.com.
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.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the given records from the zone if they exist in the zone and exactly match the input. If the input records do not exist in the zone, they are silently ignored. DeleteRecords returns only the the records that were deleted, and does not return any records that were provided in the input but did not exist in the zone.
DeleteRecords only deletes records from the zone that *exactly* match the input records—that is, the name, type, TTL, and value all must be identical to a record in the zone for it to be deleted.
As a special case, you may leave any of the fields libdns.Record.Type, libdns.Record.TTL, or libdns.Record.Value empty ("", 0, and "" respectively). In this case, DeleteRecords will delete any records that match the other fields, regardless of the value of the fields that were left empty. Note that this behavior does *not* apply to the libdns.Record.Name field, which must always be specified.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.
func (*Provider) SetRecords ¶
func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
SetRecords updates the zone so that the records described in the input are reflected in the output. It may create or update records or—depending on the record type—delete records to maintain parity with the input. No other records are affected. It returns the records which were set.
For any (name, type) pair in the input, SetRecords ensures that the only records in the output zone with that (name, type) pair are those that were provided in the input.
In RFC 9499 terms, SetRecords appends, modifies, or deletes records in the zone so that for each RRset in the input, the records provided in the input are the only members of their RRset in the output zone.
The Simply.com implementation does not implement support for DNSSEC-related records.
WARNING: Calls to SetRecords for Simply.com are not atomic. If an error occurs, one or more of the requested changes may have been applied.