Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRecordTypeMismatch = errors.New("unexpected record type") ErrMissingTrailingDot = errors.New("requests must end with a trailing dot") ErrNameSegmentInvalid = errors.New("every segment of a name must only include ascii letters, numbers, and dashes") ErrNameSegmentTooLong = errors.New("a name segment must not be longer than 63 characters") ErrNameSegmentEmpty = errors.New("a name may not have consecutive dots") ErrCouldNotLookupZone = errors.New("could not lookup zone data") ErrZoneNotFound = errors.New("zone not found or has been deleted") )
Functions ¶
This section is empty.
Types ¶
type DNSManager ¶ added in v0.1.1
type DNSManager interface {
DNSQuerier
CreateZone(ctx context.Context, fqdn string) error
DeleteZone(ctx context.Context, fqdn string) error
CreateRecord(
ctx context.Context,
name string,
zone string,
ttl uint,
recordType records.RecordType,
contents records.DNSRecordContent,
) (tables.Record, error)
UpdateRecord(ctx context.Context, id string, record UpdateRecordRequest) error
DeleteRecord(ctx context.Context, id string) error
}
func NewDNSManager ¶ added in v0.1.1
func NewDNSManager(cfg config.DatabaseConfig) (DNSManager, error)
type DNSQuerier ¶ added in v0.1.1
type DNSQuerier interface {
GetRecord(ctx context.Context, id string) (tables.Record, error)
IsZoneValid(ctx context.Context, fqdn string) (bool, error)
ResolveRequest(
ctx context.Context,
request string,
recordType records.RecordType,
) (*ResolutionResponse, error)
ListZoneRecords(ctx context.Context, zoneFQDN string) ([]tables.Record, error)
ListZones(ctx context.Context) ([]tables.Zone, error)
ListRecentlyDeletedRecords(ctx context.Context, since time.Duration) ([]tables.Record, error)
ListRecentlyDeletedZones(ctx context.Context, since time.Duration) ([]tables.Zone, error)
}
func NewDNSQuerier ¶ added in v0.1.1
func NewDNSQuerier(cfg config.DatabaseConfig) (DNSQuerier, error)
type ResolutionResponse ¶ added in v0.2.1
type UpdateRecordRequest ¶ added in v0.1.1
type UpdateRecordRequest struct {
NewName string
NewTTL uint32
NewContents records.DNSRecordContent
}
Click to show internal directories.
Click to hide internal directories.