internal

package
v4.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client the ClouDNS client.

func NewClient

func NewClient(authID, subAuthID, authPassword string) (*Client, error)

NewClient creates a ClouDNS client.

func (*Client) AddTxtRecord

func (c *Client) AddTxtRecord(zoneName, fqdn, value string, ttl int) error

AddTxtRecord adds a TXT record.

func (*Client) FindTxtRecord

func (c *Client) FindTxtRecord(zoneName, fqdn string) (*TXTRecord, error)

FindTxtRecord returns the TXT record a zone ID and a FQDN.

func (*Client) GetUpdateStatus added in v4.3.0

func (c *Client) GetUpdateStatus(zoneName string) (*SyncProgress, error)

GetUpdateStatus gets sync progress of all CloudDNS NS servers.

func (*Client) GetZone

func (c *Client) GetZone(authFQDN string) (*Zone, error)

GetZone Get domain name information for a FQDN.

func (*Client) ListTxtRecords added in v4.3.0

func (c *Client) ListTxtRecords(zoneName, fqdn string) ([]TXTRecord, error)

ListTxtRecords returns the TXT records a zone ID and a FQDN.

func (*Client) RemoveTxtRecord

func (c *Client) RemoveTxtRecord(recordID int, zoneName string) error

RemoveTxtRecord removes a TXT record.

type SyncProgress added in v4.3.0

type SyncProgress struct {
	Complete bool
	Updated  int
	Total    int
}

type TXTRecord

type TXTRecord struct {
	ID       int    `json:"id,string"`
	Type     string `json:"type"`
	Host     string `json:"host"`
	Record   string `json:"record"`
	Failover int    `json:"failover,string"`
	TTL      int    `json:"ttl,string"`
	Status   int    `json:"status"`
}

TXTRecord is a TXT record.

type UpdateRecord added in v4.3.0

type UpdateRecord struct {
	Server  string `json:"server"`
	IP4     string `json:"ip4"`
	IP6     string `json:"ip6"`
	Updated bool   `json:"updated"`
}

UpdateRecord is a Server Sync Record.

type Zone

type Zone struct {
	Name   string
	Type   string
	Zone   string
	Status string // is an integer, but cast as string
}

Zone is a zone.

Jump to

Keyboard shortcuts

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