dns

package
v0.0.0-...-12d3de5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const HCLOUD_DNS_API_TOKEN_KEY = "HCLOUD_DNS_API_TOKEN"
View Source
const HCLOUD_DNS_ZONE_ID_KEY = "HCLOUD_DNS_ZONE_ID"

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSRecord

type DNSRecord struct {
	Id     string              `json:"id"`
	Type   RecordTypeCreatable `json:"type"`
	Name   string              `json:"name"`
	Value  string              `json:"value"`
	Ttl    uint64              `json:"ttl"`
	ZoneId string              `json:"zone_id"`
}

type DNSRecordResponse

type DNSRecordResponse struct {
	DNSRecord
	Created  string `json:"created"`
	Modified string `json:"modified"`
}

type DNSRecordResponses

type DNSRecordResponses struct {
	Records []DNSRecordResponse `json:"records"`
}

func SendGetRecords

func SendGetRecords(dnsToken, zoneID string) DNSRecordResponses

type DNSRecords

type DNSRecords struct {
	Records []DNSRecord `json:"records"`
}

func GetDnsRecordsByType

func GetDnsRecordsByType(dnsToken string, zoneID string, recordTypes ...RecordTypeCreatable) DNSRecords

type RecordTypeCreatable

type RecordTypeCreatable string
const (
	A     RecordTypeCreatable = "A"
	AAAA  RecordTypeCreatable = "AAAA"
	NS    RecordTypeCreatable = "NS"
	MX    RecordTypeCreatable = "MX"
	CNAME RecordTypeCreatable = "CNAME"
	RP    RecordTypeCreatable = "RP"
	TXT   RecordTypeCreatable = "TXT"
	SOA   RecordTypeCreatable = "SOA"
	HINFO RecordTypeCreatable = "HINFO"
	SRV   RecordTypeCreatable = "SRV"
	DANE  RecordTypeCreatable = "DANE"
	TLSA  RecordTypeCreatable = "TLSA"
	DS    RecordTypeCreatable = "DS"
	CAA   RecordTypeCreatable = "CAA"
)

Jump to

Keyboard shortcuts

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