dns

package
v0.0.0-...-7b9c553 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRecord

func CreateRecord(
	client *cloudflare.API,
	clientConfig config.ClientConfig,
	zoneID *cloudflare.ResourceContainer,
) error

func SyncDNSRecord

func SyncDNSRecord(client *cloudflare.API, cfg config.ClientConfig)

SyncDNSRecord compares the current public IP with the DNS record and creates or updates the record on Cloudflare as needed.

func UpdateRecord

func UpdateRecord(
	client *cloudflare.API,
	clientConfig config.ClientConfig,
	zoneID *cloudflare.ResourceContainer,
	recordID string,
) error

Types

type ZoneRecord

type ZoneRecord struct {
	Value          string                        `json:"value"`
	RecordID       string                        `json:"record_id"`
	ZoneIdentifier *cloudflare.ResourceContainer `json:"zone_identifier"`
}

func RetrieveRecord

func RetrieveRecord(
	apiClient *cloudflare.API,
	recordName string,
	zoneName string,
) (ZoneRecord, error)

RetrieveRecord queries Cloudflare for a DNS record by name and zone name. Returns the first matching record found, or an error if none exist.

Jump to

Keyboard shortcuts

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