25 lines
422 B
Go
25 lines
422 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/libdns/libdns"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type ExampleSetter struct {
|
|
}
|
|
|
|
func (e *ExampleSetter) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error) {
|
|
for _, record := range recs {
|
|
rr := record.RR()
|
|
|
|
log.WithFields(log.Fields{
|
|
"zone": zone,
|
|
"name": rr.Name,
|
|
}).Info("Set/Update record")
|
|
}
|
|
|
|
return recs, nil
|
|
}
|