internal

package
v4.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseURL = "https://api.godaddy.com"

DefaultBaseURL represents the API endpoint to call.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(apiKey string, apiSecret string) *Client

func (*Client) GetRecords

func (c *Client) GetRecords(ctx context.Context, domainZone, rType, recordName string) ([]DNSRecord, error)

func (*Client) UpdateTxtRecords

func (c *Client) UpdateTxtRecords(ctx context.Context, records []DNSRecord, domainZone, recordName string) error

type DNSRecord

type DNSRecord struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
	Data string `json:"data"`
	TTL  int    `json:"ttl,omitempty"`

	Priority int    `json:"priority,omitempty"`
	Port     int    `json:"port,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	Service  string `json:"service,omitempty"`
	Weight   int    `json:"weight,omitempty"`
}

DNSRecord a DNS record.

Jump to

Keyboard shortcuts

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