Documentation ¶
Index ¶
- type DNS
- func (d *DNS) CreateDomainResource(r *Resource) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceA(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceAAAA(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceCNAME(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceMX(domainID int, name, target string, priority, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceNS(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceSRV(domainID int, name, target, protocol string, priority, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) CreateDomainResourceTXT(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
- func (d *DNS) DeleteDomain(domainID int) (*DomainResponse, error)
- func (d *DNS) DeleteDomainResource(domainID, resourceID int) (*ResourceResponse, error)
- func (d *DNS) GetDomain(domain string) (*Domain, error)
- func (d *DNS) GetDomainResources(domainID int) ([]*Resource, error)
- func (d *DNS) GetDomains(domainId interface{}) ([]*Domain, error)
- func (d *DNS) GetResourcesByType(domainID int, res_type string) ([]*Resource, error)
- func (d *DNS) ToLinode() *linode.Linode
- type Domain
- type DomainResponse
- type Resource
- type ResourceResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNS ¶
type DNS struct {
// contains filtered or unexported fields
}
DNS represents the interface to the DNS portion of Linode's API.
func FromLinode ¶
FromLinode returns a pointer to a new DNS object, using the provided Linode instance as backing.
func (*DNS) CreateDomainResource ¶
func (d *DNS) CreateDomainResource(r *Resource) (*ResourceResponse, error)
CreateDomainResource executes the "domain.resource.create" API call. This will create a new resource using the values specified in the resource.
func (*DNS) CreateDomainResourceA ¶
func (d *DNS) CreateDomainResourceA(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceA executes the "domain.resource.create" API call. This will create a new "A" resource using the specified parameters.
func (*DNS) CreateDomainResourceAAAA ¶
func (d *DNS) CreateDomainResourceAAAA(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceAAAA executes the "domain.resource.create" API call. This will create a new "AAAA" resource using the specified parameters.
func (*DNS) CreateDomainResourceCNAME ¶
func (d *DNS) CreateDomainResourceCNAME(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceCNAME executes the "domain.resource.create" API call. This will create a new "CNAME" resource using the specified parameters.
func (*DNS) CreateDomainResourceMX ¶
func (d *DNS) CreateDomainResourceMX(domainID int, name, target string, priority, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceMX executes the "domain.resource.create" API call. This will create a new "MX" resource using the specified parameters.
func (*DNS) CreateDomainResourceNS ¶
func (d *DNS) CreateDomainResourceNS(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceNS executes the "domain.resource.create" API call. This will create a new "NS" resource using the specified parameters.
func (*DNS) CreateDomainResourceSRV ¶
func (d *DNS) CreateDomainResourceSRV(domainID int, name, target, protocol string, priority, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceSRV executes the "domain.resource.create" API call. This will create a new "SRV" resource using the specified parameters.
func (*DNS) CreateDomainResourceTXT ¶
func (d *DNS) CreateDomainResourceTXT(domainID int, name, target string, ttlSeconds int) (*ResourceResponse, error)
CreateDomainResourceTXT executes the "domain.resource.create" API call. This will create a new "TXT" resource using the specified parameters.
func (*DNS) DeleteDomain ¶
func (d *DNS) DeleteDomain(domainID int) (*DomainResponse, error)
DeleteDomain executes the "domain.delete" API call. This will delete the domain specified by domainID.
func (*DNS) DeleteDomainResource ¶
func (d *DNS) DeleteDomainResource(domainID, resourceID int) (*ResourceResponse, error)
DeleteDomainResource executes the "domain.resource.delete" API call. This will delete the resource specified by resourceID under the domain specified by domainID.
func (*DNS) GetDomainResources ¶
GetDomainResources executes the "domain.resource.list" API call. This will return a list of domain resources associated with the specified domainID.
func (*DNS) GetDomains ¶
GetDomains executes the "domain.list" API call. When domainID is nil, this will return a list of domains. Otherwise, it will return only the domain specified by domainID.
func (*DNS) GetResourcesByType ¶
GetResourceByType returns a list of domain resources that match the specified type. This search is not case-sensitive.
type Domain ¶
type Domain struct { AXFR_IPs string `json:"AXFR_IPS"` Description string `json:"DESCRIPTION"` Domain string `json:"DOMAIN"` DomainID int `json:"DOMAINID"` Expire_Sec int `json:"EXPIRE_SEC"` LPM_DisplayGroup string `json:"LPM_DISPLAYGROUP"` Master_IPs string `json:"MASTER_IPS"` Refresh_Sec int `json:"REFRESH_SEC"` Retry_Sec int `json:"RETRY_SEC"` SOA_Email string `json:"SOA_EMAIL"` Status int `json:"STATUS"` TTL_Sec int `json:"TTL_SEC"` Type string `json:"TYPE"` }
Domain represents a domain.
type DomainResponse ¶
type DomainResponse struct {
DomainID int `json:"DomainID"`
}
DomainResponse represents the response to a create, update, or delete domain API call.
type Resource ¶
type Resource struct { DomainID int `json:"DOMAINID"` Name string `json:"NAME"` Port interface{} `json:"PORT"` Priority interface{} `json:"PRIORITY"` Protocol string `json:"PROTOCOL"` ResourceID int `json:"RESOURCEID"` Target string `json:"TARGET"` TTL_Sec int `json:"TTL_SEC"` Type string `json:"TYPE"` Weight interface{} `json:"WEIGHT"` }
Resource represents a domain resource.
type ResourceResponse ¶
type ResourceResponse struct {
ResourceID int `json:"ResourceID"`
}
ResourceResponse represents the response to a create, update, or delete resource API call.