https://github.com/libdns/powerdns
libdns powerdns provider
https://github.com/libdns/powerdns
libdns powerdns
Last synced: 4 months ago
JSON representation
libdns powerdns provider
- Host: GitHub
- URL: https://github.com/libdns/powerdns
- Owner: libdns
- License: mit
- Created: 2021-07-14T01:16:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-04T10:20:00.000Z (8 months ago)
- Last Synced: 2024-08-01T13:32:00.527Z (7 months ago)
- Topics: libdns, powerdns
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 6
- Watchers: 5
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
powerdns provider for [`libdns`](https://github.com/libdns/libdns)
=======================[](https://github.com/libdns/powerdns/actions/workflows/go.yml)
[](https://pkg.go.dev/github.com/libdns/powerdns)This package implements the [libdns interfaces](https://github.com/libdns/libdns) for
[PowerDNS](https://powerdns.com/), allowing you to
manage DNS records.This uses [mittwald/go-powerdns](https://github.com/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)
}
}