Documentation ¶
Index ¶
- Variables
- type CloudflareHandler
- type DNSPodHandler
- func (handler *DNSPodHandler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.Domain)
- func (handler *DNSPodHandler) GenerateHeader(content url.Values) url.Values
- func (handler *DNSPodHandler) GetDomain(name string) (int64, error)
- func (handler *DNSPodHandler) GetSubDomain(domainID int64, name string) (string, string, error)
- func (handler *DNSPodHandler) PostData(url string, content url.Values) (string, error)
- func (handler *DNSPodHandler) Run(domain *godns.Domain) error
- func (handler *DNSPodHandler) SetConfiguration(conf *godns.Settings)
- func (handler *DNSPodHandler) UpdateIP(domainID int64, subDomainID string, subDomainName string, ip string)
- type DNSRecord
- type DNSRecordResponse
- type DNSRecordUpdateResponse
- type HEHandler
- type IHandler
- type Zone
- type ZoneResponse
Constants ¶
This section is empty.
Variables ¶
var (
// HEUrl the API address for he.net
HEUrl = "https://dyn.dns.he.net/nic/update"
)
Functions ¶
This section is empty.
Types ¶
type CloudflareHandler ¶
CloudflareHandler struct definition
func (*CloudflareHandler) DomainLoop ¶
func (handler *CloudflareHandler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.Domain)
DomainLoop the main logic loop
func (*CloudflareHandler) SetConfiguration ¶
func (handler *CloudflareHandler) SetConfiguration(conf *godns.Settings)
SetConfiguration pass dns settings and store it to handler instance
type DNSPodHandler ¶
DNSPodHandler struct definition
func (*DNSPodHandler) DomainLoop ¶
func (handler *DNSPodHandler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.Domain)
DomainLoop the main logic loop
func (*DNSPodHandler) GenerateHeader ¶
func (handler *DNSPodHandler) GenerateHeader(content url.Values) url.Values
GenerateHeader generates the request header for DNSPod API
func (*DNSPodHandler) GetDomain ¶
func (handler *DNSPodHandler) GetDomain(name string) (int64, error)
GetDomain returns specific domain by name
func (*DNSPodHandler) GetSubDomain ¶
GetSubDomain returns subdomain by domain id
func (*DNSPodHandler) Run ¶
func (handler *DNSPodHandler) Run(domain *godns.Domain) error
Run the main logic
func (*DNSPodHandler) SetConfiguration ¶
func (handler *DNSPodHandler) SetConfiguration(conf *godns.Settings)
SetConfiguration pass dns settings and store it to handler instance
type DNSRecord ¶
type DNSRecord struct { ID string `json:"id"` IP string `json:"content"` Name string `json:"name"` Proxied bool `json:"proxied"` Type string `json:"type"` ZoneID string `json:"zone_id"` }
DNSRecord for Cloudflare API
type DNSRecordResponse ¶
DNSRecordResponse struct
type DNSRecordUpdateResponse ¶
type DNSRecordUpdateResponse struct { Record DNSRecord `json:"result"` Success bool `json:"success"` }
DNSRecordUpdateResponse struct
type HEHandler ¶
HEHandler struct
func (*HEHandler) DomainLoop ¶
DomainLoop the main logic loop
func (*HEHandler) SetConfiguration ¶
SetConfiguration pass dns settings and store it to handler instance
type IHandler ¶
type IHandler interface { SetConfiguration(*godns.Settings) DomainLoop(domain *godns.Domain, panicChan chan<- godns.Domain) }
IHandler is the interface for all DNS handlers
func CreateHandler ¶
CreateHandler creates DNS handler by different providers
type ZoneResponse ¶
ZoneResponse is a wrapper for Zones