Documentation
¶
Index ¶
- Variables
- type Api
- type DomainAddReq
- type DomainAddResp
- type DomainDeleteReq
- type DomainDisableReq
- type DomainEnableReq
- type DomainListReq
- type DomainListResp
- type DomainListRespDomain
- type LineListResp
- type LineListRespLine
- type RecordAddReq
- type RecordAddResp
- type RecordDeleteReq
- type RecordDisableReq
- type RecordEnableReq
- type RecordListReq
- type RecordListResp
- type RecordListRespRecord
- type RecordUpdateReq
- type RecordUpdateResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupportedOperation = errors.New("不支持的操作")
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api interface { Ping() (ok bool) // Ping LineList() (resp LineListResp) // 线路列表 LineDefault() (resp LineListRespLine) // 线路默认 DomainList(req DomainListReq) (resp DomainListResp, err error) // 域名列表 DomainAdd(req DomainAddReq) (resp DomainAddResp, err error) // 域名添加 DomainDelete(req DomainDeleteReq) (err error) // 域名删除 RecordList(req RecordListReq) (resp RecordListResp, err error) // 记录列表 RecordAdd(req RecordAddReq) (resp RecordAddResp, err error) // 记录新增 RecordUpdate(req RecordUpdateReq) (resp RecordUpdateResp, err error) // 记录修改 RecordDelete(req RecordDeleteReq) (err error) // 记录删除 RecordEnable(req RecordEnableReq) (err error) // 记录启用 RecordDisable(req RecordDisableReq) (err error) // 记录暂停 }
func CloudflareApi ¶
func CloudflareApi(cApi *cloudflare.API) Api
type DomainAddReq ¶
type DomainAddReq struct {
Domain string `json:"domain"` // 域名 => example.com
}
type DomainAddResp ¶
type DomainDeleteReq ¶
type DomainDisableReq ¶
type DomainEnableReq ¶
type DomainListReq ¶
type DomainListResp ¶
type DomainListResp struct { Total uint `json:"total"` List []DomainListRespDomain `json:"list"` }
type DomainListRespDomain ¶
type DomainListRespDomain struct { Id string `json:"id"` // 域名id => xxxxxxxxxxxx Name string `json:"name"` // 域名名称 => example.com DnsServer []string `json:"dns_server"` // DNS服务器 => [ns1.com, ns2.com] RecordCount uint `json:"record_count"` // 记录数 => 100 Remark string `json:"remark"` // 备注 CreateTime string `json:"create_time"` // 创建时间 => 2022-09-27 08:09:25 }
type LineListResp ¶
type LineListResp struct {
List []LineListRespLine `json:"list"`
}
type LineListRespLine ¶
type RecordAddReq ¶
type RecordAddReq struct { DomainId string `json:"domain_id"` // 域名Id => xxxxxxxxxxxx Domain string `json:"domain"` // 域名 => example.com Record string `json:"record"` // 主机记录 => www Type string `json:"type"` // 类型 => A Value string `json:"value"` // 记录值 => 1.1.1.1 Line string `json:"line"` // 线路 => 0 TTL uint `json:"ttl"` // TTL => 60 // MX uint `json:"mx"` // MX => only for mx type Weight uint `json:"weight"` // 权重 => 100 Remark string `json:"remark"` // 备注 => created by dnsdk }
type RecordAddResp ¶
type RecordAddResp struct{ RecordListRespRecord }
type RecordDeleteReq ¶
type RecordDisableReq ¶
type RecordDisableReq RecordEnableReq
type RecordEnableReq ¶
type RecordListReq ¶
type RecordListReq struct { Page uint `form:"page"` // 页码 => 1 Limit uint `form:"limit"` // 每页数量 => 10 DomainId string `form:"domain_id"` // 域名Id => xxxxxxxxxxxx Domain string `form:"domain"` // 域名 => example.com Record string `form:"record"` // 主机记录 => www Type string `form:"type"` // 解析类型 => A Line string `form:"line"` // 线路id => default Value string `form:"value"` // 记录值 => 1.1.1.1 Remark string `form:"remark"` // 备注 => created by dnsdk Order string `form:"order"` // 排序 => type Direction string `form:"direction"` // 方向 => asc / desc }
type RecordListResp ¶
type RecordListResp struct { Total uint `json:"total"` List []RecordListRespRecord `json:"list"` }
type RecordListRespRecord ¶
type RecordListRespRecord struct { Id string `json:"id"` // id => xxxxxxxxxxxx Record string `json:"record"` // 主机记录 => www Name string `json:"name"` // 名称 => www.example.com Type string `json:"type"` // 类型 => A Value string `json:"value"` // 记录值 => 1.1.1.1 Line string `json:"line"` // 线路 => default TTL uint `json:"ttl"` // TTL => 60 MX uint16 `json:"mx"` // MX => 1 Weight uint `json:"weight"` // 权重 => 5 Remark string `json:"remark"` // 备注 Status string `json:"status"` // 状态 CreateTime string `json:"create_time"` // 创建时间 => 2022-09-27 08:09:25 UpdateTime string `json:"update_time"` // 修改时间 => 2022-09-27 08:09:25 }
type RecordUpdateReq ¶
type RecordUpdateReq struct { RecordId string `json:"record_id"` // 记录Id => xxxxxxxxxxxx DomainId string `json:"domain_id"` // 域名Id => xxxxxxxxxxxx Domain string `json:"domain"` // 域名 => example.com Record string `json:"record"` // 主机记录 => www Type string `json:"type"` // 类型 => A Value string `json:"value"` // 记录值 => 1.1.1.1 Line string `json:"line"` // 线路 => 0 TTL uint `json:"ttl"` // TTL => 60 // MX uint `json:"mx"` // MX => only for mx type Weight uint `json:"weight"` // 权重 => 100 Remark string `json:"remark"` // 备注 => created by dnsdk }
type RecordUpdateResp ¶
type RecordUpdateResp RecordAddResp
Click to show internal directories.
Click to hide internal directories.