Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.37 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.37 KB

powerdns provider for libdns

Github Actions Go Reference

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

This uses mittwald/go-powerdns under the covers to actually talk to powerdns.

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)
    }

}