internal

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 9 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 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 add a TXT record.

func (*Client) FindTxtRecord

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

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

func (*Client) GetZone

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

GetZone Get domain name information for a FQDN.

func (*Client) RemoveTxtRecord

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

RemoveTxtRecord remove a TXT record.

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 a TXT record.

type TXTRecords

type TXTRecords map[string]TXTRecord

type Zone

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

Jump to

Keyboard shortcuts

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