Documentation ¶
Index ¶
- Variables
- func RunOnce()
- func RunTimer(delay time.Duration)
- type Alidns
- type AlidnsRecord
- type AlidnsResp
- type AlidnsSubDomainRecords
- type BaiduCloud
- type BaiduCreateRequest
- type BaiduListRequest
- type BaiduModifyRequest
- type BaiduRecord
- type BaiduRecordsResp
- type Callback
- type Cloudflare
- type CloudflareRecord
- type CloudflareRecordsResp
- type CloudflareStatus
- type CloudflareZonesResp
- type DNS
- type Dnspod
- type DnspodRecord
- type DnspodRecordListResp
- type DnspodStatus
- type Dynadot
- type DynadotRecord
- type DynadotResp
- type GoDaddyDNS
- type Huaweicloud
- type HuaweicloudRecordsResp
- type HuaweicloudRecordsets
- type HuaweicloudZonesResp
- type ListExistingRecordsResponse
- type NameCheap
- type NameCheapResp
- type NameSilo
- type NameSiloDNSListRecordResp
- type NameSiloResp
- type Porkbun
- type PorkbunApiKey
- type PorkbunDomainCreateOrUpdateVO
- type PorkbunDomainQueryResponse
- type PorkbunDomainRecord
- type PorkbunResponse
- type Record
- type Reply
- type ReplyResponse
- type Request
- type ResourceRecord
- type TencentCloud
- type TencentCloudRecord
- type TencentCloudRecordListsResp
- type TencentCloudStatus
- type TrafficRoute
- type TrafficRouteMeta
- type TrafficRouteRecordsResp
- type TrafficRouteRespMeta
- type TrafficRouteStatus
- type TrafficRouteZonesResp
- type Vercel
Constants ¶
This section is empty.
Variables ¶
var ( Addresses = []string{ alidnsEndpoint, baiduEndpoint, zonesAPI, recordListAPI, huaweicloudEndpoint, nameCheapEndpoint, nameSiloListRecordEndpoint, porkbunEndpoint, tencentCloudEndPoint, dynadotEndpoint, } Ipcache = [][2]util.IpCache{} )
Functions ¶
Types ¶
type Alidns ¶
https://help.aliyun.com/document_detail/29776.html?spm=a2c4g.11186623.6.672.715a45caji9dMA Alidns Alidns
func (*Alidns) AddUpdateDomainRecords ¶
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type AlidnsRecord ¶
AlidnsRecord record
type AlidnsSubDomainRecords ¶
type AlidnsSubDomainRecords struct { TotalCount int DomainRecords struct { Record []AlidnsRecord } }
AlidnsSubDomainRecords 记录
type BaiduCloud ¶
func (*BaiduCloud) AddUpdateDomainRecords ¶
func (baidu *BaiduCloud) AddUpdateDomainRecords() config.Domains
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type BaiduCreateRequest ¶
type BaiduCreateRequest struct { Domain string `json:"domain"` RdType string `json:"rdType"` TTL int `json:"ttl"` Rdata string `json:"rdata"` ZoneName string `json:"zoneName"` }
BaiduCreateRequest 创建新解析请求的body json
type BaiduListRequest ¶
type BaiduListRequest struct { Domain string `json:"domain"` PageNum int `json:"pageNum"` PageSize int `json:"pageSize"` }
BaiduListRequest 获取解析列表请求的body json
type BaiduModifyRequest ¶
type BaiduModifyRequest struct { RecordId uint `json:"recordId"` Domain string `json:"domain"` View string `json:"view"` RdType string `json:"rdType"` TTL int `json:"ttl"` Rdata string `json:"rdata"` ZoneName string `json:"zoneName"` }
BaiduModifyRequest 修改解析请求的body json
type BaiduRecord ¶
type BaiduRecord struct { RecordId uint `json:"recordId"` Domain string `json:"domain"` View string `json:"view"` Rdtype string `json:"rdtype"` TTL int `json:"ttl"` Rdata string `json:"rdata"` ZoneName string `json:"zoneName"` Status string `json:"status"` }
BaiduRecord 单条解析记录
type BaiduRecordsResp ¶
type BaiduRecordsResp struct { TotalCount int `json:"totalCount"` Result []BaiduRecord `json:"result"` }
BaiduRecordsResp 获取解析列表拿到的结果
type Callback ¶
type Callback struct { DNS config.DNS Domains config.Domains TTL string // contains filtered or unexported fields }
func (*Callback) AddUpdateDomainRecords ¶
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type Cloudflare ¶
Cloudflare Cloudflare实现
func (*Cloudflare) AddUpdateDomainRecords ¶
func (cf *Cloudflare) AddUpdateDomainRecords() config.Domains
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type CloudflareRecord ¶
type CloudflareRecord struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Content string `json:"content"` Proxied bool `json:"proxied"` TTL int `json:"ttl"` Comment string `json:"comment"` }
CloudflareRecord 记录实体
type CloudflareRecordsResp ¶
type CloudflareRecordsResp struct { CloudflareStatus Result []CloudflareRecord }
CloudflareRecordsResp records
type CloudflareStatus ¶
CloudflareStatus 公共状态
type CloudflareZonesResp ¶
type CloudflareZonesResp struct { CloudflareStatus Result []struct { ID string Name string Status string Paused bool } }
CloudflareZonesResp cloudflare zones返回结果
type DNS ¶
type DNS interface { Init(dnsConf *config.DnsConfig, ipv4cache *util.IpCache, ipv6cache *util.IpCache) // 添加或更新IPv4/IPv6记录 AddUpdateDomainRecords() (domains config.Domains) }
DNS interface
type Dnspod ¶
https://cloud.tencent.com/document/api/302/8516 Dnspod 腾讯云dns实现
func (*Dnspod) AddUpdateDomainRecords ¶
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type DnspodRecord ¶
DnspodRecord DnspodRecord
type DnspodRecordListResp ¶
type DnspodRecordListResp struct { DnspodStatus Records []DnspodRecord }
DnspodRecordListResp recordListAPI结果
type DnspodStatus ¶
DnspodStatus DnspodStatus
type Dynadot ¶ added in v6.3.0
type Dynadot struct { DNS config.DNS Domains config.Domains TTL string LastIpv4 string LastIpv6 string }
Dynadot Dynadot
func (*Dynadot) AddUpdateDomainRecords ¶ added in v6.3.0
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type DynadotRecord ¶ added in v6.3.0
type DynadotRecord struct { DomainName string SubDomainNames []string CustomParams url.Values Domains []*config.Domain ContainRoot bool }
DynadotRecord record
type DynadotResp ¶ added in v6.3.0
type DynadotResp struct { Status string `json:"status"` ErrorCode int `json:"error_code"` Content []string `json:"content"` }
DynadotResp 修改/添加返回结果
type GoDaddyDNS ¶
type GoDaddyDNS struct {
// contains filtered or unexported fields
}
func (*GoDaddyDNS) AddUpdateDomainRecords ¶
func (g *GoDaddyDNS) AddUpdateDomainRecords() config.Domains
type Huaweicloud ¶
https://support.huaweicloud.com/api-dns/dns_api_64001.html Huaweicloud Huaweicloud
func (*Huaweicloud) AddUpdateDomainRecords ¶
func (hw *Huaweicloud) AddUpdateDomainRecords() config.Domains
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type HuaweicloudRecordsResp ¶
type HuaweicloudRecordsResp struct {
Recordsets []HuaweicloudRecordsets
}
HuaweicloudRecordsResp 记录返回结果
type HuaweicloudRecordsets ¶
type HuaweicloudRecordsets struct { ID string Name string `json:"name"` ZoneID string `json:"zone_id"` Status string Type string `json:"type"` TTL int `json:"ttl"` Records []string `json:"records"` }
HuaweicloudRecordsets 记录
type HuaweicloudZonesResp ¶
type HuaweicloudZonesResp struct { Zones []struct { ID string Name string Recordsets []HuaweicloudRecordsets } }
HuaweicloudZonesResp zones response
type ListExistingRecordsResponse ¶ added in v6.3.0
type ListExistingRecordsResponse struct {
Records []Record `json:"records"`
}
type NameCheap ¶
type NameCheap struct { DNS config.DNS Domains config.Domains // contains filtered or unexported fields }
NameCheap Domain
func (*NameCheap) AddUpdateDomainRecords ¶
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type NameSilo ¶
type NameSilo struct { DNS config.DNS Domains config.Domains // contains filtered or unexported fields }
NameSilo Domain
func (*NameSilo) AddUpdateDomainRecords ¶
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type NameSiloResp ¶
type NameSiloResp struct { XMLName xml.Name `xml:"namesilo"` Request Request `xml:"request"` Reply ReplyResponse `xml:"reply"` }
NameSiloResp 修改域名解析结果
type Porkbun ¶
func (*Porkbun) AddUpdateDomainRecords ¶
AddUpdateDomainRecords 添加或更新IPv4/IPv6记录
type PorkbunApiKey ¶
type PorkbunDomainCreateOrUpdateVO ¶
type PorkbunDomainCreateOrUpdateVO struct { *PorkbunApiKey *PorkbunDomainRecord }
type PorkbunDomainQueryResponse ¶
type PorkbunDomainQueryResponse struct { *PorkbunResponse Records []PorkbunDomainRecord `json:"records"` }
type PorkbunDomainRecord ¶
type PorkbunResponse ¶
type PorkbunResponse struct {
Status string `json:"status"`
}
type Record ¶ added in v6.3.0
type Record struct { ID string `json:"id"` // 记录ID Slug string `json:"slug"` Name string `json:"name"` // 记录名称 Type string `json:"type"` // 记录类型 Value string `json:"value"` // 记录值 Creator string `json:"creator"` Created int64 `json:"created"` Updated int64 `json:"updated"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` TTL int64 `json:"ttl"` Comment *string `json:"comment,omitempty"` }
type Reply ¶
type Reply struct { Code int `xml:"code"` Detail string `xml:"detail"` ResourceItems []ResourceRecord `xml:"resource_record"` }
type ReplyResponse ¶
type ResourceRecord ¶
type TencentCloud ¶
TencentCloud 腾讯云 DNSPod API 3.0 实现 https://cloud.tencent.com/document/api/1427/56193
func (*TencentCloud) AddUpdateDomainRecords ¶
func (tc *TencentCloud) AddUpdateDomainRecords() config.Domains
AddUpdateDomainRecords 添加或更新 IPv4/IPv6 记录
type TencentCloudRecord ¶
type TencentCloudRecord struct { Domain string `json:"Domain"` // DescribeRecordList 不需要 SubDomain SubDomain string `json:"SubDomain,omitempty"` // CreateRecord/ModifyRecord 不需要 Subdomain Subdomain string `json:"Subdomain,omitempty"` RecordType string `json:"RecordType"` RecordLine string `json:"RecordLine"` // DescribeRecordList 不需要 Value Value string `json:"Value,omitempty"` // CreateRecord/DescribeRecordList 不需要 RecordId RecordId int `json:"RecordId,omitempty"` // DescribeRecordList 不需要 TTL TTL int `json:"TTL,omitempty"` }
TencentCloudRecord 腾讯云记录
type TencentCloudRecordListsResp ¶
type TencentCloudRecordListsResp struct { TencentCloudStatus Response struct { RecordCountInfo struct { TotalCount int `json:"TotalCount"` } `json:"RecordCountInfo"` RecordList []TencentCloudRecord `json:"RecordList"` } }
TencentCloudRecordListsResp 获取域名的解析记录列表返回结果
type TencentCloudStatus ¶
TencentCloudStatus 腾讯云返回状态 https://cloud.tencent.com/document/product/1427/56192
type TrafficRoute ¶ added in v6.7.0
TrafficRoute trafficRoute
func (*TrafficRoute) AddUpdateDomainRecords ¶ added in v6.7.0
func (tr *TrafficRoute) AddUpdateDomainRecords() config.Domains
AddUpdateDomainRecords 添加或更新 IPv4/IPv6 记录
type TrafficRouteMeta ¶ added in v6.7.0
type TrafficRouteMeta struct { ZID int `json:"ZID"` RecordID string `json:"RecordID"` // 需要更新的解析记录的 ID PQDN string `json:"PQDN"` // 解析记录所包含的主机名 Host string `json:"Host"` // 主机记录,即子域名的域名前缀 TTL int `json:"TTL"` // 解析记录的过期时间 Type string `json:"Type"` // 解析记录的类型 Line string `json:"Line"` // 解析记录对应的线路代号, 一般为default Value string `json:"Value"` // 解析记录的记录值 }
TrafficRouteRecord record
type TrafficRouteRecordsResp ¶ added in v6.7.0
type TrafficRouteRecordsResp struct { Resp TrafficRouteRespMeta Result struct { TotalCount int Records []TrafficRouteMeta } }
TrafficRouteResp 修改/添加返回结果
type TrafficRouteRespMeta ¶ added in v6.7.0
type TrafficRouteRespMeta struct { RequestId string Action string Version string Service string Region string Error struct { CodeN int Code string Message string MessageCN string } }
TrafficRoute 公共状态
type TrafficRouteStatus ¶ added in v6.7.0
type TrafficRouteStatus struct { Resp TrafficRouteRespMeta Result struct { ZoneName string Status bool RecordCount int } }
TrafficRouteStatus TrafficRoute 返回状态 https://www.volcengine.com/docs/6758/155089
type TrafficRouteZonesResp ¶ added in v6.7.0
type TrafficRouteZonesResp struct { Resp TrafficRouteRespMeta Total int Result struct { Zones []struct { ZID int ZoneName string RecordCount int } Total int } }
TrafficRouteZonesResp TrafficRoute zones返回结果