Documentation
¶
Overview ¶
Package arvancloud implements a DNS record management client compatible with the libdns interfaces for ArvanCloud.
Index ¶
- type ANAMERecordValue
- type ARecordValue
- type CAARecordValue
- type CNAMERecordValue
- type IPFilter
- type MXRecordValue
- type NSRecordValue
- type PTRRecordValue
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) ListZones(ctx context.Context) ([]libdns.Zone, error)
- func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- type SRVRecordValue
- type TLSARecordValue
- type TXTRecordValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ANAMERecordValue ¶
type ANAMERecordValue struct {
Location string `json:"location"`
HostHeader string `json:"host_header,omitempty"`
Port int `json:"port,omitempty"`
}
ANAMERecordValue represents the value structure for ANAME records.
type ARecordValue ¶
type ARecordValue struct {
IP string `json:"ip"`
Port int `json:"port,omitempty"`
Weight int `json:"weight,omitempty"`
Country string `json:"country,omitempty"`
}
ARecordValue represents the value structure for A and AAAA records. Note: The API expects a slice of these for A/AAAA records.
type CAARecordValue ¶
CAARecordValue represents the value structure for CAA records.
type CNAMERecordValue ¶
type CNAMERecordValue struct {
Host string `json:"host"`
HostHeader string `json:"host_header,omitempty"`
Port int `json:"port,omitempty"`
}
CNAMERecordValue represents the value structure for CNAME records.
type IPFilter ¶
type IPFilter struct {
Count string `json:"count"`
GeoFilter string `json:"geo_filter"`
Order string `json:"order"`
}
IPFilter defines the IP filtering mode for a record.
type MXRecordValue ¶
MXRecordValue represents the value structure for MX records.
type NSRecordValue ¶
type NSRecordValue struct {
Host string `json:"host"`
}
NSRecordValue represents the value structure for NS records.
type PTRRecordValue ¶
type PTRRecordValue struct {
Domain string `json:"domain"`
}
PTRRecordValue represents the value structure for PTR records.
type Provider ¶
type Provider struct {
// AuthAPIKey is the API token for ArvanCloud.
// It can be obtained from the ArvanCloud user panel.
AuthAPIKey string `json:"auth_api_key,omitempty"`
// contains filtered or unexported fields
}
Provider facilitates DNS record manipulation with ArvanCloud.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone. It returns the records that were added.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the specified records from the zone. It returns the records that were deleted.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.
type SRVRecordValue ¶
type SRVRecordValue struct {
Target string `json:"target"`
Port uint16 `json:"port"`
Priority uint16 `json:"priority"`
Weight uint16 `json:"weight"`
}
SRVRecordValue represents the value structure for SRV records.
type TLSARecordValue ¶
type TLSARecordValue struct {
Usage string `json:"usage"`
Selector string `json:"selector"`
MatchingType string `json:"matching_type"`
Certificate string `json:"certificate"`
}
TLSARecordValue represents the value structure for TLSA records.
type TXTRecordValue ¶
type TXTRecordValue struct {
Text string `json:"text"`
}
TXTRecordValue represents the value structure for TXT records.