Documentation
¶
Overview ¶
Package driver defines the interface for DNS service implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNS ¶
type DNS interface {
CreateZone(ctx context.Context, config ZoneConfig) (*ZoneInfo, error)
DeleteZone(ctx context.Context, id string) error
GetZone(ctx context.Context, id string) (*ZoneInfo, error)
ListZones(ctx context.Context) ([]ZoneInfo, error)
CreateRecord(ctx context.Context, config RecordConfig) (*RecordInfo, error)
DeleteRecord(ctx context.Context, zoneID, name, recordType string) error
GetRecord(ctx context.Context, zoneID, name, recordType string) (*RecordInfo, error)
ListRecords(ctx context.Context, zoneID string) ([]RecordInfo, error)
UpdateRecord(ctx context.Context, config RecordConfig) (*RecordInfo, error)
}
DNS is the interface that DNS provider implementations must satisfy.
type RecordConfig ¶
type RecordConfig struct {
ZoneID string
Name string
Type string // "A", "AAAA", "CNAME", "MX", "TXT", "NS", "SOA", "SRV"
TTL int
Values []string
Weight *int // for weighted routing, nil means not weighted
SetID string
}
RecordConfig describes a DNS record.
type RecordInfo ¶
type RecordInfo struct {
ZoneID string
Name string
Type string
TTL int
Values []string
Weight *int
SetID string
}
RecordInfo describes a DNS record.
type ZoneConfig ¶
ZoneConfig describes a DNS zone to create.
Click to show internal directories.
Click to hide internal directories.