Categorygithub.com/libdns/autodns
repositorypackage
0.0.0-20250217093418-afbefb5b548d
Repository: https://github.com/libdns/autodns.git
Documentation: pkg.go.dev

# README

<autodns> for libdns

Go Reference

This package implements the libdns interfaces for <autodns>, allowing you to manage DNS records.

Example:

package main

import (
	"context"
	"os"
	"log"

	"github.com/libdns/autodns"
)

func main() {
	provider := autodns.Provider{
		Username: os.Getenv("AUTODNS_USERNAME"),
		Password: os.Getenv("AUTODNS_PASSWORD"),
	}

	records, err := provider.GetRecords(context.TODO(), "zone.example.org")
	if err != nil {
		log.Fatalf("unexpected error: %s", err)
	}

	fmt.Printf("%#v", records)
}

As an alternative, configure the provider struct with the following:

FieldDescription (default)Required
 Usernameusername, emptyyes
 Passwordpassword, emptyyes
 Endpointhttps://api.autodns.com/v1no
 Context4no
 HttpClient&http.Client{}no