provider

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package easydns implements a DNS record management client compatible with the libdns interfaces for EasyDNS. See https://cp.easydns.com/manage/security/ to manage Token and Key information for your account.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// EasyDNS API Token (required)
	APIToken string `json:"api_token,omitempty"`
	// EasyDNS API Key (required)
	APIKey string `json:"api_key,omitempty"`
	// EasyDNS API URL (defaults to https://rest.easydns.net)
	APIUrl string `json:"api_url,omitempty"`

	Prefix string
}

Provider facilitates DNS record manipulation with EasyDNS.

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 records from the zone. It returns the records that were deleted.

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)

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 sets the records in the zone, either by updating existing records or creating new ones. It returns the updated records.

type SkyDNSRecord

type SkyDNSRecord struct {
	Host string `json:"host"`
	TTL  int    `json:"ttl"`
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL