Documentation
¶
Index ¶
- func OpError(op string, err error) error
- func OpErrors(op string) *opErrors
- type CredentialInfo
- type DomainRecord
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CredentialInfo ¶
type CredentialInfo struct {
// The API Key ID Required by VolcEngine for accessing the API
AccessKeyID string `json:"access_key_id"`
// The API Key Secret Required by VolcEngine for accessing the API
AccessKeySecret string `json:"access_key_secret"`
// Optional for identifying the region of the VolcEngine Service, default is cn-beijing
RegionID string `json:"region_id,omitempty"`
}
CredentialInfo implements param of the credential
type DomainRecord ¶
type DomainRecord struct {
Type string
Name string
Value string
TTL ttl_t
Priority ttl_t
ID string
}
func (DomainRecord) RR ¶
func (r DomainRecord) RR() libdns.RR
type Provider ¶
type Provider struct {
CredentialInfo
// ZID is the domain ID used to directly query DNS records (highest priority)
// VolcEngine API uses ZID instead of zone to identify domains
ZID int64 `json:"zid,omitempty"`
// Zone is the domain name. When ZID is not set, it will look up the corresponding ZID via ListZones API
// Priority: ZID > Zone > zone parameter
Zone string `json:"zone,omitempty"`
// contains filtered or unexported fields
}
Provider implements the libdns interfaces for VolcEngine DNS.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records. It returns the records that were added. ZID resolution priority: Provider.ZID > Provider.Zone > zone parameter
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the records. If a record does not have an ID, it will be looked up. It returns the records that were deleted. ZID resolution priority: Provider.ZID > Provider.Zone > zone parameter
func (*Provider) GetRecords ¶
GetRecords lists all the records. ZID resolution priority: Provider.ZID > Provider.Zone > zone parameter
func (*Provider) SetRecords ¶
func (p *Provider) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)
SetRecords sets the records, either by updating existing records or creating new ones. It returns the updated records. ZID resolution priority: Provider.ZID > Provider.Zone > zone parameter