Documentation
¶
Index ¶
- Constants
- type Auth
- func (a *Auth) CreateRecord(r Record) (model.CreateRecordSetResponse, error)
- func (a *Auth) DeleteRecord(id string) (model.DeleteRecordSetResponse, error)
- func (a *Auth) FindRecord(id string) (model.ShowRecordSetResponse, error)
- func (a *Auth) GetZones() (dm.ShowPublicZoneResponse, error)
- func (a *Auth) RecordList(Type ...string) (model.ListRecordSetsByZoneResponse, error)
- func (a *Auth) UpdateRecord(id string, r Record) (model.UpdateRecordSetResponse, error)
- type Record
- type Tag
Constants ¶
View Source
const ( RecordTypeA = "A" // ipv4 RecordTypeAAAA = "AAAA" // ipv6 RecordTypeCNAME = "CNAME" // 域名 RecordTypeMX = "MX" // 邮件 RecordTypeTXT = "TXT" // 文本 RecordTypeSRV = "SRV" // 服务 RecordTypeNS = "NS" // 名称服务器 RecordTypeCAA = "CAA" // 证书 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { AccessKey string `json:"access_token"` SecretAccessKey string `json:"secret_access_key"` Domain string `json:"domain"` ZoneId string `json:"zone_id"` }
func (*Auth) CreateRecord ¶ added in v0.0.3
func (a *Auth) CreateRecord(r Record) (model.CreateRecordSetResponse, error)
func (*Auth) DeleteRecord ¶ added in v0.0.3
func (a *Auth) DeleteRecord(id string) (model.DeleteRecordSetResponse, error)
func (*Auth) FindRecord ¶ added in v0.0.3
func (a *Auth) FindRecord(id string) (model.ShowRecordSetResponse, error)
func (*Auth) RecordList ¶ added in v0.0.3
func (a *Auth) RecordList(Type ...string) (model.ListRecordSetsByZoneResponse, error)
func (*Auth) UpdateRecord ¶ added in v0.0.3
type Record ¶ added in v0.0.3
type Record struct { // 域名,后缀需以zone name结束且为FQDN(即以“.”号结束的完整主机名)。 Name string `json:"name"` // 可选配置,对域名的描述。 长度不超过255个字符。 默认值为空。 Description string `json:"description,omitempty"` // Record Set的类型。 公网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 内网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、SRV。 Type string `json:"type"` // 资源状态。 Status string `json:"status,omitempty"` // 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 如果您的服务地址经常更换,建议TTL值设置相对小些,反之,建议设置相对大些。 Ttl int32 `json:"ttl,omitempty"` // 解析记录的值。不同类型解析记录对应的值的规则不同。 Records []string `json:"records"` // 资源标签。 Tags []Tag `json:"tags,omitempty"` }
Click to show internal directories.
Click to hide internal directories.