safedns

package
v0.0.0-...-7821fa8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafeDNS

type SafeDNS interface {
	CreateZoneRecord(zoneName string, req safedns.CreateRecordRequest) (int, error)
	DeleteZoneRecord(zoneName string, recordID int) error
	GetZone(zoneName string) (safedns.Zone, error)
	GetZoneRecord(zoneName string, recordID int) (safedns.Record, error)
	GetZoneRecords(zoneName string, parameters ansConnection.APIRequestParameters) ([]safedns.Record, error)
	GetZones(parameters ansConnection.APIRequestParameters) ([]safedns.Zone, error)
	PatchZoneRecord(zoneName string, recordID int, patch safedns.PatchRecordRequest) (int, error)
	UpdateZoneRecord(zoneName string, record safedns.Record) (int, error)
}

SafeDNS is an interface that is a subset of the SafeDNS service API that are actually used. Signatures must match exactly.

type SafeDNSProvider

type SafeDNSProvider struct {
	provider.BaseProvider
	Client SafeDNS

	DryRun           bool
	APIRequestParams ansConnection.APIRequestParameters
	// contains filtered or unexported fields
}

SafeDNSProvider implements the DNS provider spec for UKFast SafeDNS.

func NewSafeDNSProvider

func NewSafeDNSProvider(domainFilter endpoint.DomainFilter, dryRun bool) (*SafeDNSProvider, error)

func (*SafeDNSProvider) ApplyChanges

func (p *SafeDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*SafeDNSProvider) Records

func (p *SafeDNSProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records returns a list of Endpoint resources created from all records in supported zones.

func (*SafeDNSProvider) ZoneRecords

func (p *SafeDNSProvider) ZoneRecords(ctx context.Context) ([]ZoneRecord, error)

func (*SafeDNSProvider) Zones

func (p *SafeDNSProvider) Zones(ctx context.Context) ([]safedns.Zone, error)

Zones returns the list of hosted zones in the SafeDNS account

type ZoneRecord

type ZoneRecord struct {
	ID      int
	Name    string
	Type    safedns.RecordType
	TTL     safedns.RecordTTL
	Zone    string
	Content string
}

ZoneRecord is a datatype to simplify management of a record in a zone.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL