Documentation ¶
Index ¶
- Constants
- func FindAllProviderTypes() []maps.Map
- func FindProviderTypeName(providerType ProviderType) string
- func IsMasked(s string) bool
- func MaskString(s string) string
- func UnmaskAPIParams(oldParamsJSON []byte, newParamsJSON []byte) (resultJSON []byte, err error)
- type AliDNSProvider
- func (this *AliDNSProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *AliDNSProvider) Auth(params maps.Map) error
- func (this *AliDNSProvider) DefaultRoute() string
- func (this *AliDNSProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *AliDNSProvider) GetDomains() (domains []string, err error)
- func (this *AliDNSProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *AliDNSProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *AliDNSProvider) MaskParams(params maps.Map)
- func (this *AliDNSProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *AliDNSProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
- func (this *AliDNSProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
- type BaseProvider
- type CloudFlareProvider
- func (this *CloudFlareProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *CloudFlareProvider) Auth(params maps.Map) error
- func (this *CloudFlareProvider) DefaultRoute() string
- func (this *CloudFlareProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *CloudFlareProvider) GetDomains() (domains []string, err error)
- func (this *CloudFlareProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *CloudFlareProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *CloudFlareProvider) MaskParams(params maps.Map)
- func (this *CloudFlareProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *CloudFlareProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) (records []*dnstypes.Record, err error)
- func (this *CloudFlareProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
- type CustomHTTPProvider
- func (this *CustomHTTPProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *CustomHTTPProvider) Auth(params maps.Map) error
- func (this *CustomHTTPProvider) DefaultRoute() string
- func (this *CustomHTTPProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *CustomHTTPProvider) GetDomains() (domains []string, err error)
- func (this *CustomHTTPProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *CustomHTTPProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *CustomHTTPProvider) MaskParams(params maps.Map)
- func (this *CustomHTTPProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *CustomHTTPProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) (result []*dnstypes.Record, err error)
- func (this *CustomHTTPProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
- type DNSPodProvider
- func (this *DNSPodProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *DNSPodProvider) Auth(params maps.Map) error
- func (this *DNSPodProvider) DefaultRoute() string
- func (this *DNSPodProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *DNSPodProvider) GetDomains() (domains []string, err error)
- func (this *DNSPodProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *DNSPodProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *DNSPodProvider) MaskParams(params maps.Map)
- func (this *DNSPodProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *DNSPodProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
- func (this *DNSPodProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
- type DomainRecordsCache
- func (this *DomainRecordsCache) AddDomainRecord(providerId int64, domain string, record *dnstypes.Record)
- func (this *DomainRecordsCache) Clean()
- func (this *DomainRecordsCache) DeleteDomainRecord(providerId int64, domain string, recordId string)
- func (this *DomainRecordsCache) QueryDomainRecord(providerId int64, domain string, recordName string, recordType string) (record *dnstypes.Record, hasRecords bool, ok bool)
- func (this *DomainRecordsCache) QueryDomainRecords(providerId int64, domain string, recordName string, recordType string) (records []*dnstypes.Record, hasRecords bool, ok bool)
- func (this *DomainRecordsCache) UpdateDomainRecord(providerId int64, domain string, record *dnstypes.Record)
- func (this *DomainRecordsCache) WriteDomainRecords(providerId int64, domain string, records []*dnstypes.Record)
- type EdgeDNSAPIProvider
- func (this *EdgeDNSAPIProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *EdgeDNSAPIProvider) Auth(params maps.Map) error
- func (this *EdgeDNSAPIProvider) DefaultRoute() string
- func (this *EdgeDNSAPIProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *EdgeDNSAPIProvider) GetDomains() (domains []string, err error)
- func (this *EdgeDNSAPIProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *EdgeDNSAPIProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *EdgeDNSAPIProvider) MaskParams(params maps.Map)
- func (this *EdgeDNSAPIProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *EdgeDNSAPIProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
- func (this *EdgeDNSAPIProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
- type HuaweiDNSProvider
- func (this *HuaweiDNSProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *HuaweiDNSProvider) Auth(params maps.Map) error
- func (this *HuaweiDNSProvider) DefaultRoute() string
- func (this *HuaweiDNSProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *HuaweiDNSProvider) GetDomains() (domains []string, err error)
- func (this *HuaweiDNSProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *HuaweiDNSProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *HuaweiDNSProvider) MaskParams(params maps.Map)
- func (this *HuaweiDNSProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *HuaweiDNSProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
- func (this *HuaweiDNSProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
- type ProviderInterface
- type ProviderType
- type TencentDNSProvider
- func (this *TencentDNSProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
- func (this *TencentDNSProvider) Auth(params maps.Map) error
- func (this *TencentDNSProvider) DefaultRoute() string
- func (this *TencentDNSProvider) DefaultRouteName() string
- func (this *TencentDNSProvider) DeleteRecord(domain string, record *dnstypes.Record) error
- func (this *TencentDNSProvider) GetDomains() (domains []string, err error)
- func (this *TencentDNSProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
- func (this *TencentDNSProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
- func (this *TencentDNSProvider) MaskParams(params maps.Map)
- func (this *TencentDNSProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
- func (this *TencentDNSProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
- func (this *TencentDNSProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
Constants ¶
const ( DNSPodMaxTTL int32 = 604800 DNSPodInternational = "international" )
const CloudFlareAPIEndpoint = "https://api.cloudflare.com/client/v4/"
const CloudFlareDefaultRoute = "default"
const HuaweiDNSDefaultEndpoint = "https://dns.cn-north-4.myhuaweicloud.com/"
HuaweiDNSDefaultEndpoint 默认Endpoint 所有Endpoints:https://developer.huaweicloud.com/endpoint?DNS
Variables ¶
This section is empty.
Functions ¶
func FindProviderTypeName ¶
func FindProviderTypeName(providerType ProviderType) string
FindProviderTypeName 查找服务商名称
Types ¶
type AliDNSProvider ¶
type AliDNSProvider struct { BaseProvider ProviderId int64 // contains filtered or unexported fields }
AliDNSProvider 阿里云服务商
func (*AliDNSProvider) AddRecord ¶
func (this *AliDNSProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*AliDNSProvider) DefaultRoute ¶
func (this *AliDNSProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*AliDNSProvider) DeleteRecord ¶
func (this *AliDNSProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*AliDNSProvider) GetDomains ¶
func (this *AliDNSProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*AliDNSProvider) GetRecords ¶
func (this *AliDNSProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名列表
func (*AliDNSProvider) GetRoutes ¶
func (this *AliDNSProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取域名支持的线路数据
func (*AliDNSProvider) MaskParams ¶ added in v1.3.4
func (this *AliDNSProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*AliDNSProvider) QueryRecord ¶
func (this *AliDNSProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*AliDNSProvider) QueryRecords ¶ added in v0.5.8
func (this *AliDNSProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
QueryRecords 查询多个记录
func (*AliDNSProvider) UpdateRecord ¶
func (this *AliDNSProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录
type BaseProvider ¶
type BaseProvider struct {
// contains filtered or unexported fields
}
func (*BaseProvider) SetMinTTL ¶ added in v1.3.9
func (this *BaseProvider) SetMinTTL(ttl int32)
SetMinTTL 设置最小TTL
type CloudFlareProvider ¶
type CloudFlareProvider struct { BaseProvider ProviderId int64 // contains filtered or unexported fields }
func (*CloudFlareProvider) AddRecord ¶
func (this *CloudFlareProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*CloudFlareProvider) Auth ¶
func (this *CloudFlareProvider) Auth(params maps.Map) error
Auth 认证
func (*CloudFlareProvider) DefaultRoute ¶
func (this *CloudFlareProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*CloudFlareProvider) DeleteRecord ¶
func (this *CloudFlareProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*CloudFlareProvider) GetDomains ¶
func (this *CloudFlareProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*CloudFlareProvider) GetRecords ¶
func (this *CloudFlareProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名解析记录列表
func (*CloudFlareProvider) GetRoutes ¶
func (this *CloudFlareProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取域名支持的线路数据
func (*CloudFlareProvider) MaskParams ¶ added in v1.3.4
func (this *CloudFlareProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*CloudFlareProvider) QueryRecord ¶
func (this *CloudFlareProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*CloudFlareProvider) QueryRecords ¶ added in v0.5.8
func (this *CloudFlareProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) (records []*dnstypes.Record, err error)
QueryRecords 查询多个记录
func (*CloudFlareProvider) UpdateRecord ¶
func (this *CloudFlareProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录
type CustomHTTPProvider ¶
type CustomHTTPProvider struct { ProviderId int64 BaseProvider // contains filtered or unexported fields }
CustomHTTPProvider HTTP自定义DNS
func (*CustomHTTPProvider) AddRecord ¶
func (this *CustomHTTPProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*CustomHTTPProvider) Auth ¶
func (this *CustomHTTPProvider) Auth(params maps.Map) error
Auth 认证 参数:
- url
- secret
func (*CustomHTTPProvider) DefaultRoute ¶
func (this *CustomHTTPProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*CustomHTTPProvider) DeleteRecord ¶
func (this *CustomHTTPProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*CustomHTTPProvider) GetDomains ¶
func (this *CustomHTTPProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*CustomHTTPProvider) GetRecords ¶
func (this *CustomHTTPProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名解析记录列表
func (*CustomHTTPProvider) GetRoutes ¶
func (this *CustomHTTPProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取域名支持的线路数据
func (*CustomHTTPProvider) MaskParams ¶ added in v1.3.4
func (this *CustomHTTPProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*CustomHTTPProvider) QueryRecord ¶
func (this *CustomHTTPProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*CustomHTTPProvider) QueryRecords ¶ added in v0.5.8
func (this *CustomHTTPProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) (result []*dnstypes.Record, err error)
QueryRecords 查询多个记录
func (*CustomHTTPProvider) UpdateRecord ¶
func (this *CustomHTTPProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录
type DNSPodProvider ¶
type DNSPodProvider struct { BaseProvider ProviderId int64 // contains filtered or unexported fields }
DNSPodProvider DNSPod服务商
func (*DNSPodProvider) AddRecord ¶
func (this *DNSPodProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*DNSPodProvider) DefaultRoute ¶
func (this *DNSPodProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*DNSPodProvider) DeleteRecord ¶
func (this *DNSPodProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*DNSPodProvider) GetDomains ¶
func (this *DNSPodProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*DNSPodProvider) GetRecords ¶
func (this *DNSPodProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名列表
func (*DNSPodProvider) GetRoutes ¶
func (this *DNSPodProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取线路数据
func (*DNSPodProvider) MaskParams ¶ added in v1.3.4
func (this *DNSPodProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*DNSPodProvider) QueryRecord ¶
func (this *DNSPodProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*DNSPodProvider) QueryRecords ¶ added in v0.5.8
func (this *DNSPodProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
QueryRecords 查询多个记录
func (*DNSPodProvider) UpdateRecord ¶
func (this *DNSPodProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录
type DomainRecordsCache ¶ added in v0.5.6
type DomainRecordsCache struct {
// contains filtered or unexported fields
}
DomainRecordsCache 域名记录缓存
func NewDomainRecordsCache ¶ added in v0.5.6
func NewDomainRecordsCache() *DomainRecordsCache
func (*DomainRecordsCache) AddDomainRecord ¶ added in v0.5.6
func (this *DomainRecordsCache) AddDomainRecord(providerId int64, domain string, record *dnstypes.Record)
AddDomainRecord 添加域名记录缓存
func (*DomainRecordsCache) Clean ¶ added in v0.5.6
func (this *DomainRecordsCache) Clean()
Clean 清除过期缓存
func (*DomainRecordsCache) DeleteDomainRecord ¶ added in v0.5.6
func (this *DomainRecordsCache) DeleteDomainRecord(providerId int64, domain string, recordId string)
DeleteDomainRecord 删除域名记录缓存
func (*DomainRecordsCache) QueryDomainRecord ¶ added in v0.5.6
func (this *DomainRecordsCache) QueryDomainRecord(providerId int64, domain string, recordName string, recordType string) (record *dnstypes.Record, hasRecords bool, ok bool)
QueryDomainRecord 从缓存中读取单条域名记录
func (*DomainRecordsCache) QueryDomainRecords ¶ added in v0.5.8
func (this *DomainRecordsCache) QueryDomainRecords(providerId int64, domain string, recordName string, recordType string) (records []*dnstypes.Record, hasRecords bool, ok bool)
QueryDomainRecords 从缓存中读取多条域名记录
func (*DomainRecordsCache) UpdateDomainRecord ¶ added in v0.5.6
func (this *DomainRecordsCache) UpdateDomainRecord(providerId int64, domain string, record *dnstypes.Record)
UpdateDomainRecord 修改域名记录缓存
func (*DomainRecordsCache) WriteDomainRecords ¶ added in v0.5.6
func (this *DomainRecordsCache) WriteDomainRecords(providerId int64, domain string, records []*dnstypes.Record)
WriteDomainRecords 写入域名记录缓存
type EdgeDNSAPIProvider ¶ added in v0.5.3
type EdgeDNSAPIProvider struct { BaseProvider ProviderId int64 // contains filtered or unexported fields }
func (*EdgeDNSAPIProvider) AddRecord ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*EdgeDNSAPIProvider) Auth ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) Auth(params maps.Map) error
Auth 认证
func (*EdgeDNSAPIProvider) DefaultRoute ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*EdgeDNSAPIProvider) DeleteRecord ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*EdgeDNSAPIProvider) GetDomains ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*EdgeDNSAPIProvider) GetRecords ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名解析记录列表
func (*EdgeDNSAPIProvider) GetRoutes ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取域名支持的线路数据
func (*EdgeDNSAPIProvider) MaskParams ¶ added in v1.3.4
func (this *EdgeDNSAPIProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*EdgeDNSAPIProvider) QueryRecord ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*EdgeDNSAPIProvider) QueryRecords ¶ added in v0.5.8
func (this *EdgeDNSAPIProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
QueryRecords 查询多个记录
func (*EdgeDNSAPIProvider) UpdateRecord ¶ added in v0.5.3
func (this *EdgeDNSAPIProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录
type HuaweiDNSProvider ¶
type HuaweiDNSProvider struct { BaseProvider ProviderId int64 // contains filtered or unexported fields }
HuaweiDNSProvider 华为云DNS 相关文档链接:https://support.huaweicloud.com/api-dns/dns_api_62001.html
func (*HuaweiDNSProvider) AddRecord ¶
func (this *HuaweiDNSProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*HuaweiDNSProvider) DefaultRoute ¶
func (this *HuaweiDNSProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*HuaweiDNSProvider) DeleteRecord ¶
func (this *HuaweiDNSProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*HuaweiDNSProvider) GetDomains ¶
func (this *HuaweiDNSProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*HuaweiDNSProvider) GetRecords ¶
func (this *HuaweiDNSProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名解析记录列表
func (*HuaweiDNSProvider) GetRoutes ¶
func (this *HuaweiDNSProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取域名支持的线路数据
func (*HuaweiDNSProvider) MaskParams ¶ added in v1.3.4
func (this *HuaweiDNSProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*HuaweiDNSProvider) QueryRecord ¶
func (this *HuaweiDNSProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*HuaweiDNSProvider) QueryRecords ¶ added in v0.5.8
func (this *HuaweiDNSProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
QueryRecords 查询多个记录
func (*HuaweiDNSProvider) UpdateRecord ¶
func (this *HuaweiDNSProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录
type ProviderInterface ¶
type ProviderInterface interface { // Auth 认证 Auth(params maps.Map) error // MaskParams 对参数进行掩码 MaskParams(params maps.Map) // GetDomains 获取所有域名列表 GetDomains() (domains []string, err error) // GetRecords 获取域名解析记录列表 GetRecords(domain string) (records []*dnstypes.Record, err error) // GetRoutes 读取域名支持的线路数据 GetRoutes(domain string) (routes []*dnstypes.Route, err error) // QueryRecord 查询单个记录 QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error) // QueryRecords 查询多个记录 QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error) // AddRecord 设置记录 AddRecord(domain string, newRecord *dnstypes.Record) error // UpdateRecord 修改记录 UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error // DeleteRecord 删除记录 DeleteRecord(domain string, record *dnstypes.Record) error // DefaultRoute 默认线路 DefaultRoute() string // SetMinTTL 设置最小TTL SetMinTTL(ttl int32) // MinTTL 最小TTL MinTTL() int32 }
ProviderInterface DNS操作接口
func FindProvider ¶
func FindProvider(providerType ProviderType, providerId int64) ProviderInterface
FindProvider 查找服务商实例
type ProviderType ¶
type ProviderType = string
const ( ProviderTypeDNSPod ProviderType = "dnspod" // DNSPod ProviderTypeAliDNS ProviderType = "alidns" // 阿里云DNS ProviderTypeHuaweiDNS ProviderType = "huaweiDNS" // 华为DNS ProviderTypeCloudFlare ProviderType = "cloudFlare" // CloudFlare DNS ProviderTypeLocalEdgeDNS ProviderType = "localEdgeDNS" // 和当前系统集成的EdgeDNS ProviderTypeEdgeDNSAPI ProviderType = "edgeDNSAPI" // 通过API连接的EdgeDNS ProviderTypeCustomHTTP ProviderType = "customHTTP" // 自定义HTTP接口 )
服务商代号
type TencentDNSProvider ¶ added in v1.3.1
type TencentDNSProvider struct { BaseProvider ProviderId int64 // contains filtered or unexported fields }
TencentDNSProvider 腾讯云DNS云解析
func NewTencentDNSProvider ¶ added in v1.3.1
func NewTencentDNSProvider() *TencentDNSProvider
func (*TencentDNSProvider) AddRecord ¶ added in v1.3.1
func (this *TencentDNSProvider) AddRecord(domain string, newRecord *dnstypes.Record) error
AddRecord 设置记录
func (*TencentDNSProvider) Auth ¶ added in v1.3.1
func (this *TencentDNSProvider) Auth(params maps.Map) error
Auth 认证
func (*TencentDNSProvider) DefaultRoute ¶ added in v1.3.1
func (this *TencentDNSProvider) DefaultRoute() string
DefaultRoute 默认线路
func (*TencentDNSProvider) DefaultRouteName ¶ added in v1.3.1
func (this *TencentDNSProvider) DefaultRouteName() string
func (*TencentDNSProvider) DeleteRecord ¶ added in v1.3.1
func (this *TencentDNSProvider) DeleteRecord(domain string, record *dnstypes.Record) error
DeleteRecord 删除记录
func (*TencentDNSProvider) GetDomains ¶ added in v1.3.1
func (this *TencentDNSProvider) GetDomains() (domains []string, err error)
GetDomains 获取所有域名列表
func (*TencentDNSProvider) GetRecords ¶ added in v1.3.1
func (this *TencentDNSProvider) GetRecords(domain string) (records []*dnstypes.Record, err error)
GetRecords 获取域名列表
func (*TencentDNSProvider) GetRoutes ¶ added in v1.3.1
func (this *TencentDNSProvider) GetRoutes(domain string) (routes []*dnstypes.Route, err error)
GetRoutes 读取线路数据
func (*TencentDNSProvider) MaskParams ¶ added in v1.3.4
func (this *TencentDNSProvider) MaskParams(params maps.Map)
MaskParams 对参数进行掩码
func (*TencentDNSProvider) QueryRecord ¶ added in v1.3.1
func (this *TencentDNSProvider) QueryRecord(domain string, name string, recordType dnstypes.RecordType) (*dnstypes.Record, error)
QueryRecord 查询单个记录
func (*TencentDNSProvider) QueryRecords ¶ added in v1.3.1
func (this *TencentDNSProvider) QueryRecords(domain string, name string, recordType dnstypes.RecordType) ([]*dnstypes.Record, error)
QueryRecords 查询多个记录
func (*TencentDNSProvider) UpdateRecord ¶ added in v1.3.1
func (this *TencentDNSProvider) UpdateRecord(domain string, record *dnstypes.Record, newRecord *dnstypes.Record) error
UpdateRecord 修改记录