Skip to content

scopisto/powerdns

 
 

Repository files navigation

powerdns provider for libdns

Github Actions Go Reference

This package implements the libdns interfaces for PowerDNS, allowing you to manage DNS records.

To configure this, simply specify the server URL and the access token.

package main

import (
    "context"

    "github.com/libdns/libdns"
    "github.com/libdns/powerdns"
)

func main() {
    p := &powerdns.Provider{
        ServerURL: "http://localhost", // required
        ServerID:  "localhost",        // if left empty, defaults to localhost.
        APIToken:  "asdfasdfasdf",     // required
    }

    _, err := p.AppendRecords(context.Background(), "example.org.", []libdns.Record{
        {
            Name:  "_acme_whatever",
            Type:  "TXT",
            Value: "123456",
        },
    })
    if err != nil {
        panic(err)
    }

}

Packages

No packages published

Languages

  • Go 100.0%