[feature] Initial commit
This commit is contained in:
24
example.go
Normal file
24
example.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user