Documentation
¶
Overview ¶
package dnsmadeeasy provides a client for the DNS Made Easy API The API Reference is currently available at: http://www.dnsmadeeasy.com/wp-content/uploads/2014/07/API-Docv2.pdf
Index ¶
- type APIError
- type Client
- func (c *Client) AddRecord(domainId uint32, record *Record) error
- func (c *Client) CreateDomain(domainName string) (*Domain, error)
- func (c *Client) CreateDomains(domainNames []string) ([]uint32, error)
- func (c *Client) DelRecord(domainId, recordId uint32) error
- func (c *Client) DeleteDomain(id uint32) error
- func (c *Client) DeleteDomains(ids []uint32) error
- func (c *Client) GetDomainById(id uint32) (*Domain, error)
- func (c *Client) GetDomainByName(name string) (*Domain, error)
- func (c *Client) GetDomainRecords(id uint32) ([]*Record, error)
- func (c *Client) GetDomains() (*DomainList, error)
- func (c *Client) UpdDomains(ids []uint32, fields map[string]interface{}) error
- func (c *Client) UpdRecord(domainId uint32, record *Record) error
- type Domain
- type DomainList
- type DomainRecords
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
Represents an API Error. Code corresponds to the HTTP Status Code returned by the API. Messages is a list of error messages returned by the DNS Made Easy API
type Client ¶
A Client is the basic type of this package. It provides methods for interacting with the DNS Made Easy API.
func NewClient ¶
NewClient returns an instance of Client ready to be used for communication with DNS Made Easy's API
func (*Client) CreateDomains ¶
CreateDomains creates all the domains passed in its argument. When multiple domains are created at once, the API only returns domain ids.
func (*Client) DeleteDomain ¶
func (*Client) DeleteDomains ¶
func (*Client) GetDomains ¶
func (c *Client) GetDomains() (*DomainList, error)
func (*Client) UpdDomains ¶
type Domain ¶
type Domain struct {
ActiveThirdParties []string
Created int64
DelegateNameServers []string
FolderId int
GtdEnabled bool
Id uint32
Name string
NameServers []struct {
Fqdn string
Ipv4 net.IP
Ipv6 net.IP
}
PendingActionId int
ProcessMulti bool
Updated int64
}
Domain represents a DNS Made Easy domain
type DomainList ¶
DomainList represents a list of Domains
type DomainRecords ¶
type DomainRecords struct {
Records []*Record `json:"data"`
Domain Domain
Page int
TotalPages int
TotalRecords int
}
DomainRecords holds a list of Records associated to a specific Domain
type Record ¶
type Record struct {
DynamicDns bool `json:",omitempty"`
Failed bool `json:",omitempty"`
Failover bool `json:",omitempty"`
GtdLocation string `json:"gtdLocation"`
HardLink bool `json:",omitempty"`
Id uint32 `json:"id,omitempty"`
Monitor bool `json:",omitempty"`
Name string `json:"name"`
Source int `json:",omitempty"`
SourceId int `json:",omitempty"`
Ttl int `json:"ttl"`
Type string `json:"type"`
Value string `json:"value"`
Error []string `json:"error,omitempty"`
}
A Record represents a DNS record (A, CNAME, AAAA, etc.)