internal

package
v4.14.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseURL = "https://rest.easydns.net"

DefaultBaseURL the default API endpoint.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL    *url.URL
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client the EasyDNS API client.

func NewClient

func NewClient(token string, key string) *Client

NewClient Creates a new Client.

func (*Client) AddRecord

func (c *Client) AddRecord(ctx context.Context, domain string, record ZoneRecord) (string, error)

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(ctx context.Context, domain, recordID string) error

type ZoneRecord

type ZoneRecord struct {
	ID       string `json:"id,omitempty"`
	Domain   string `json:"domain"`
	Host     string `json:"host"`
	TTL      string `json:"ttl"`
	Priority string `json:"prio"`
	Type     string `json:"type"`
	Rdata    string `json:"rdata"`
	LastMod  string `json:"last_mod,omitempty"`
	Revoked  int    `json:"revoked,omitempty"`
	NewHost  string `json:"new_host,omitempty"`
}

Jump to

Keyboard shortcuts

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