internal

package
v4.14.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 11 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 {
	BaseURL    *url.URL
	HTTPClient *http.Client
	// 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(ctx context.Context, zoneName, fqdn, value string, ttl int) error

AddTxtRecord adds a TXT record.

func (*Client) FindTxtRecord

func (c *Client) FindTxtRecord(ctx context.Context, zoneName, fqdn string) (*TXTRecord, error)

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

func (*Client) GetUpdateStatus

func (c *Client) GetUpdateStatus(ctx context.Context, zoneName string) (*SyncProgress, error)

GetUpdateStatus gets sync progress of all CloudDNS NS servers.

func (*Client) GetZone

func (c *Client) GetZone(ctx context.Context, authFQDN string) (*Zone, error)

GetZone Get domain name information for a FQDN.

func (*Client) ListTxtRecords

func (c *Client) ListTxtRecords(ctx context.Context, zoneName, fqdn string) ([]TXTRecord, error)

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

func (*Client) RemoveTxtRecord

func (c *Client) RemoveTxtRecord(ctx context.Context, recordID int, zoneName string) error

RemoveTxtRecord removes a TXT record.

type SyncProgress

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

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