Documentation ¶
Index ¶
- func NewAliyunClient(secretID, secretKey string) (*alidns.Client, error)
- func NewAwsDnsClient(secretID string, secretKey string) *route53.Client
- func NewAwsDomainClient(secretID string, secretKey string) *route53domains.Client
- func NewCloudflareDNSClient(token string, email string) (*cloudflare.API, error)
- func NewDNSLaClient(secretID, secretKey string) (*dnsla.Client, error)
- func NewGodaddyClient(secretID, secretKey string) (*daddy.Client, error)
- func NewTencentClient(secretID, secretKey string) (*dnspod.Client, error)
- type AliyunDNS
- type AmazonDNS
- type CloudFlareDNS
- type DNSLaDNS
- type DNSProvider
- type DNSProviderFactory
- type Domain
- type GetRecordCertReq
- type GodaddyDNS
- type Header
- type Record
- type RecordCert
- type RecordType
- type TencentCloudDNS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAliyunClient ¶
NewAliyunClient 初始化客户端
func NewAwsDnsClient ¶ added in v0.1.4
func NewAwsDomainClient ¶ added in v0.1.4
func NewAwsDomainClient(secretID string, secretKey string) *route53domains.Client
func NewCloudflareDNSClient ¶ added in v0.1.5
func NewDNSLaClient ¶ added in v0.1.4
NewDNSLaClient 初始化客户端
func NewGodaddyClient ¶ added in v0.1.2
NewGodaddyClient 初始化客户端
Types ¶
type AliyunDNS ¶
type AliyunDNS struct {
// contains filtered or unexported fields
}
func (*AliyunDNS) ListDomains ¶
ListDomains 获取域名列表
func (*AliyunDNS) ListRecords ¶
ListRecords 获取记录列表
type AmazonDNS ¶ added in v0.1.4
type AmazonDNS struct {
// contains filtered or unexported fields
}
func (*AmazonDNS) ListDomains ¶ added in v0.1.4
func (*AmazonDNS) ListRecords ¶ added in v0.1.4
type CloudFlareDNS ¶ added in v0.1.5
type CloudFlareDNS struct {
// contains filtered or unexported fields
}
func NewCloudFlareDNS ¶ added in v0.1.5
func NewCloudFlareDNS(account public.Account) *CloudFlareDNS
func (*CloudFlareDNS) ListDomains ¶ added in v0.1.5
func (cf *CloudFlareDNS) ListDomains() ([]Domain, error)
func (*CloudFlareDNS) ListRecords ¶ added in v0.1.5
func (cf *CloudFlareDNS) ListRecords() ([]Record, error)
type DNSLaDNS ¶ added in v0.1.4
type DNSLaDNS struct {
// contains filtered or unexported fields
}
func NewDNSLaDNS ¶ added in v0.1.4
NewDNSLaDNS 创建 DNSLaDNS 实例
func (*DNSLaDNS) ListDomains ¶ added in v0.1.4
ListDomains 获取域名列表
func (*DNSLaDNS) ListRecords ¶ added in v0.1.4
ListRecords 获取记录列表
type DNSProvider ¶
DNSProvider 接口定义
type DNSProviderFactory ¶
type DNSProviderFactory struct {
// contains filtered or unexported fields
}
DNSProviderFactory 用于注册和创建 DNSProvider 实例
var Factory *DNSProviderFactory
func NewDNSProviderFactory ¶
func NewDNSProviderFactory() *DNSProviderFactory
func (*DNSProviderFactory) Create ¶
func (f *DNSProviderFactory) Create(cloudProvider string, account map[string]string) (DNSProvider, error)
Create 创建 DNSProvider 实例
func (*DNSProviderFactory) Register ¶
func (f *DNSProviderFactory) Register(cloudProvider string, factoryFunc func(account map[string]string) DNSProvider)
Register 注册 DNSProvider 实现
type Domain ¶
type Domain struct { CloudProvider string `json:"cloud_provider"` CloudName string `json:"cloud_name"` DomainID string `json:"domain_id"` DomainName string `json:"domain_name"` DomainRemark string `json:"domain_remark"` DomainStatus string `json:"domain_status"` CreatedDate string `json:"created_date"` ExpiryDate string `json:"expiry_date"` DaysUntilExpiry int64 `json:"days_until_expiry"` }
Doamin 域名信息
type GetRecordCertReq ¶
type GodaddyDNS ¶ added in v0.1.2
type GodaddyDNS struct {
// contains filtered or unexported fields
}
func NewGodaddyDNS ¶ added in v0.1.2
func NewGodaddyDNS(account public.Account) (*GodaddyDNS, error)
NewGodaddyDNS 创建 GodaddyDNS 实例
func (*GodaddyDNS) ListDomains ¶ added in v0.1.2
func (g *GodaddyDNS) ListDomains() ([]Domain, error)
ListDomains 获取域名列表
func (*GodaddyDNS) ListRecords ¶ added in v0.1.2
func (g *GodaddyDNS) ListRecords() ([]Record, error)
ListRecords 获取记录列表
type Header ¶ added in v0.1.5
type Header struct { XAuthEmail interface{} `json:"X-Auth-Email"` XAuthKey interface{} `json:"X-Auth-Key"` ContentType string `json:"Content-Type"` }
type Record ¶
type Record struct { CloudProvider string `json:"cloud_provider"` CloudName string `json:"cloud_name"` DomainName string `json:"domain_name"` RecordID string `json:"record_id"` RecordType string `json:"record_type"` RecordName string `json:"record_name"` RecordValue string `json:"record_value"` RecordTTL string `json:"record_ttl"` RecordWeight string `json:"record_weight"` RecordStatus string `json:"record_status"` RecordRemark string `json:"record_remark"` UpdateTime string `json:"update_time"` FullRecord string `json:"full_record"` // 完整记录 = Name + Value }
Record 域名记录信息
type RecordCert ¶
type RecordCert struct { CloudProvider string `json:"cloud_provider"` CloudName string `json:"cloud_name"` DomainName string `json:"domain_name"` // 域名 FullRecord string `json:"full_record"` // 完整记录 = Name + Value RecordID string `json:"record_id"` // 记录ID SubjectCommonName string `json:"subject_common_name"` // 颁发对象的公用名 SubjectOrganization string `json:"subject_organization"` // 颁发对象的组织 SubjectOrganizationalUnit string `json:"subject_organizational_unit"` // 颁发对象的组织单位 IssuerCommonName string `json:"issuer_common_name"` // 颁发者的公用名 IssuerOrganization string `json:"issuer_organization"` // 颁发者的组织 IssuerOrganizationalUnit string `json:"issuer_organizational_unit"` // 颁发者的组织单位 CreatedDate string `json:"created_date"` // 创建日期 ExpiryDate string `json:"expiry_date"` // 过期日期 DaysUntilExpiry int `json:"days_until_expiry"` // 距离到期日期还有多少天 CertMatched bool `json:"cert_matched"` // 证书是否匹配 ErrorMsg string `json:"error_msg"` }
RecordCert 域名证书信息
type RecordType ¶ added in v0.1.4
type RecordType int
RecordType 表示DNS记录类型
const ( A RecordType = 1 NS RecordType = 2 CNAME RecordType = 5 MX RecordType = 15 TXT RecordType = 16 AAAA RecordType = 28 SRV RecordType = 33 CAA RecordType = 257 URLForward RecordType = 256 )
定义常量
type TencentCloudDNS ¶
type TencentCloudDNS struct {
// contains filtered or unexported fields
}
func NewTencentCloudDNS ¶
func NewTencentCloudDNS(account public.Account) (*TencentCloudDNS, error)
NewTencentCloudDNS 创建 TencentCloudDNS 实例
func (*TencentCloudDNS) ListDomains ¶
func (t *TencentCloudDNS) ListDomains() ([]Domain, error)
ListDomains 获取域名列表
func (*TencentCloudDNS) ListRecords ¶
func (t *TencentCloudDNS) ListRecords() ([]Record, error)
ListRecords 获取记录列表
Click to show internal directories.
Click to hide internal directories.