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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSandboxBaseURL = "https://api.sandbox.dnsmadeeasy.com/V2.0"
	DefaultProdBaseURL    = "https://api.dnsmadeeasy.com/V2.0"
)

Default API endpoints.

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 DNSMadeEasy client.

func NewClient

func NewClient(apiKey, apiSecret string) (*Client, error)

NewClient creates a DNSMadeEasy client.

func (*Client) CreateRecord

func (c *Client) CreateRecord(ctx context.Context, domain *Domain, record *Record) error

CreateRecord creates a TXT records.

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(ctx context.Context, record Record) error

DeleteRecord deletes a TXT records.

func (*Client) GetDomain

func (c *Client) GetDomain(ctx context.Context, authZone string) (*Domain, error)

GetDomain gets a domain.

func (*Client) GetRecords

func (c *Client) GetRecords(ctx context.Context, domain *Domain, recordName, recordType string) (*[]Record, error)

GetRecords gets all TXT records.

type Domain

type Domain struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Domain holds the DNSMadeEasy API representation of a Domain.

type Record

type Record struct {
	ID       int    `json:"id"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Value    string `json:"value"`
	TTL      int    `json:"ttl"`
	SourceID int    `json:"sourceId"`
}

Record holds the DNSMadeEasy API representation of a Domain Record.

Jump to

Keyboard shortcuts

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