Skip to content

Estivador/hdns-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hdns: A Go library for the Hetzner DNS API

GitHub Actions status GoDoc

Package hdns is a library for the Hetzner DNS API.

The library’s documentation is available at GoDoc, the public API documentation is available at dns.hetzner.com.

Example

package main

import (
    "context"
    "fmt"
    "log"

    "github.com/Estivador/hdns-go/hdns"
)

func main() {
    client := hdns.NewClient(hdns.WithToken("token"))

    zone, _, err := client.Zone.GetByID(context.Background(), 1)
    if err != nil {
        log.Fatalf("error retrieving zone: %s\n", err)
    }
    if zone != nil {
        fmt.Printf("zone 1 is called %q\n", zone.Name)
    } else {
        fmt.Println("zone 1 not found")
    }
}

License

MIT license

About

A Go library for the Hetzner DNS API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published