Library for working with Hetzner DNS API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Vladimir Smagin d31cdce414 examples 2 months ago
example examples 2 months ago
API_help.md readme 10 months ago
Jenkinsfile add some tests 2 months ago
LICENSE Изменить 'LICENSE' 4 months ago
go.mod add some tests 2 months ago
go.sum add some tests 2 months ago
hcloud-dns.go add some tests 2 months ago
hcloud-dns_test.go add some tests 2 months ago
readme.md examples 2 months ago
records.go add some tests 2 months ago
records_test.go add some tests 2 months ago
types.go add some tests 2 months ago
types_complex.go add some tests 2 months ago
zones.go add some tests 2 months ago
zones_test.go add some tests 2 months ago

readme.md

Hetzner DNS golang library

I made this library to interact with Hetzner DNS API in most easy way. Hopefully in future it will be used for Hetzner external-dns provider. Check out example directory and API_help.md.

Get your own token on Hetzner DNS and place it to token variable and run code

token := "jcB2UywP9XtZGhvhSHpH5m"
client := hclouddns.New(token)

zones, err := client.GetZones(hclouddns.HCloudGetZonesParams{})
if err != nil {
	log.Fatalln(err)
}

for _, v := range zones.Zones {
	fmt.Printf("Zone %v:\n\tRecords count: %v\n\tStatus: %v\n\n", v.Name, v.RecordsCount, v.Status)
}

At this moment library supports all API requests. If you found some bug mail me or register here and create issue.


Copyright by Vladimir Smagin (21h) 2020
http://blindage.org email: 21h@blindage.org
Project page: https://git.blindage.org/21h/hcloud-dns