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.
Click to show internal directories.
Click to hide internal directories.