Commit graph

26 commits

Author SHA1 Message Date
Tom Limoncelli
87ad01d194
Add "get-zone" command (#613)
* Add GetZoneRecords to DNSProvider interface
* dnscontrol now uses ufave/cli/v2
* NEW: get-zones.md
* HasRecordTypeName should be a method on models.Records not models.DomainConfig
* Implement BIND's GetZoneRecords
* new WriteZoneFile implemented
* go mod vendor
* Update docs to use get-zone instead of convertzone
* Add CanGetZone capability and update all providers.
* Get all zones for a provider at once (#626)
* implement GetZoneRecords for cloudflare
* munge cloudflare ttls
* Implement GetZoneRecords for cloudflare (#625)

Co-authored-by: Craig Peterson <192540+captncraig@users.noreply.github.com>
2020-02-18 08:59:18 -05:00
Patrick Gaskin
825ba2d081 Switch to Go 1.13 error wrapping (#604)
* Replaced errors.Wrap with fmt.Errorf (#589)

* Find:    errors\.Wrap\(([^,]+),\s+(["`][^"`]*)(["`])\)
  Replace: fmt.Errorf($2: %w$3, $1)

* Replaced errors.Wrapf with fmt.Errorf (#589)

* Find:    errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])\)
  Replace: fmt.Errorf($2: %w$3, $1)
* Find:    errors\.Wrapf\(([^,]+),\s+(["`][^"`]*)(["`])(,[^)]+)\)
* Replace: fmt.Errorf($2: %w$3$4, $1)

* Replaced errors.Errorf with fmt.Errorf (#589)

* Find:    errors\.Errorf
  Replace: fmt.Errorf

* Cleaned up remaining imports

* Cleanup

* Regenerate provider support matrix

This was broken by #533 ... and it's now the third time this has been missed.
2020-01-28 11:06:56 -05:00
Patrick Gaskin
2f83aa9302 Internals: Switch to v2 go.mod, drop GOPATH, and fix Azure Pipelines (#595)
* Switched to v2 go.mod

Also set GO111MODULE=on in build stuff to always use Go modules
even when in GOPATH.

* Ensure go.mod, go.sum, and vendor are up to date

* Attempt to fix Azure pipelines

* Add set -e to properly fail on exit (it didn't seem to be
  propagating properly before).
* Set workingDirectory for GoFmt and GoGen (this might be why it
  fails unlike compile and unitests).

* Another attempt to fix Azure Pipelines

* Use the Go env template for all go-related jobs.

* Completely fixed Azure Pipelines

* Added a display name to GoFmt for consistency.
* Fixed diffs for GoFmt and GoGen.
* Show git status for checks.

* Drop GOPATH for tests

TODO: Do the same for integration tests.

* Drop GOPATH for integration tests

* Show more diffs

* Regenerate provider support matrix

This wasn't done in #590...
2020-01-28 10:42:31 -05:00
Tom Limoncelli
f6ce421fdd
NEW PROVIDER: GANDI_V5 (deprecates GANDI) (#572)
* GANDI_v5: Add Registrar support
* Add GANDI deprecation warning
* vendor github.com/tiramiseb/go-gandi
2020-01-20 14:13:32 -05:00
rdalverny
79c548b168 GANDI-LIVEDNS: Support for multi TXT records verified (#545)
It seems it does support them.
2019-08-26 14:07:02 -04:00
rdalverny
b968de3ef7 GANDI-LIVE: Print actual changes to be pushed (#546)
* gandi/livedns: Print actual changes to be pushed

Currently, preview & push output prints all domain records values:

    $ dnscontrol preview
    ----- DNS Provider: gandi...1 correction
    #1: Setting dns records for example.com:
    mail.example.com.
    1.2.3.4
    "ga"
    "bu"
    "zo"

With this change, it would only show what changes from current state:

    $ dnscontrol preview
    ----- DNS Provider: gandi...1 correction
    #1: Setting dns records for example.com:
    CREATE TXT ga.example.com "ga" ttl=10800
    MODIFY TXT bu.example.com "bu" ttl=10800
    DELETE TXT meu.example.com "meu" ttl=10800

* Add import
2019-08-26 13:38:07 -04:00
Ed Bardsley
06ee4d6fb1 Verbose debug logging via the ConsolePrinter and printer package. (#404)
This:
 * adds a global -v flag for verbosity
 * refactors the "printer" package to have a DefaultPrinter and package
   functions that call it, similar to net/http's DefaultServeMux
 * adds printer tests
 * moves current users of Debugf to Printf
 * moves most users of the "log" package to use "printer"
 * demotes noticably noisy log messages to "Debugf", like "IGNORE"-
   and "NO_PURGE"-related messages
2018-10-08 16:10:44 -04:00
Tom Limoncelli
a7eba97ada
Refactor in preparation to unexport RecordConfig.{Name,NameFQDN,Target} (#337)
* Preparing for the unexport of Name/NameFQDN/Target
* Cleanups
2018-03-19 17:18:58 -04:00
Tom Limoncelli
1097c96fcc
New Provider: GANDI-LIVEDNS (API v5) (#320)
* Add gandi LiveDNS api provider
* vendor testify and gandi live DNS
* govendor update github.com/prasmussen/gandi-api/{client,live_dns}
* Fix Gandi-livedns TXT unit test
* TravisCI should use go 1.10
2018-02-24 13:40:18 -05:00
Tom Limoncelli
de4455942b
Refactor RecordConfig: Add getters/setters (#314)
* Replace RecordConfig.Name and .NameFQDN with getters and setters.
* Replace RecordConfig.Target with getters and setters.
* Eliminate the CombinedTarget concept.
* Add RecordConfig.PopulateFromString to reduce code in all providers.
* encode and decode name.com txt records (#315)
* Replace fmt.Errorf with errors.Errorf
2018-02-15 12:02:50 -05:00
Tom Limoncelli
4b1dc82c9b
Switch from fmt.Error* to errors.Error* (#317) 2018-02-05 16:17:20 -05:00
Tom Limoncelli
b7c251190f
Vet and Lint the entire system (#296)
* govet and golint corrections
2018-01-09 12:53:16 -05:00
Tom Limoncelli
de88bfe8b7
Add support for TXT records with multiple strings (BIND, ROUTE53) (#293)
* BIND: Support TXT records with multiple strings (#289)
* ROUTE53: Add support for TXT records with multiple strings (#292)
2018-01-04 19:19:35 -05:00
Tom Limoncelli
a0f14e5981
GANDI: Add support for CAA rtype (#288)
* GANDI: Add support for CAA rtype
2017-12-22 07:10:29 -05:00
Philipp Hug
53b72f39a8 GANDI: Registrar support (#274)
* GANDI: add registrar support for changing nameservers. #87

* Update docs with Gandi registrar support #87

* Updated dependencies for Gandi Registrar Support #87
2017-11-27 13:04:24 -05:00
Tom Limoncelli
e7472f76f3 Downcase DNS names (#253)
* Downcase DNS names
* Document opinions
2017-11-07 14:12:17 -08:00
Craig Peterson
3a90435357 Create a dynamic provider features matrix (#201)
* adding simple provider feature matrix generator

* filling out matrix

* clean output

* dead code

* explanatory text

* explanatory text

* typo

* move stuff around

* clean

* editing
2017-09-14 16:13:17 -04:00
chewrocca
4244d5f638 adding functionality to allow Gandi to use SRV record types (#192)
* adding CombineSRVs and SplitCombinedSrvValues

adding support for Gandi SRV record types

* adding dc.CombineSRVs()

adding dc.CombineSRVs() to allow Gandi SRV record types.

* adding providers.CanUseSRV

adding providers.CanUseSRV for allowing Gandi to use SRV record types.

* adding case "SRV"

adding case SRV to allow Gandi to use SRV record types.
2017-08-29 10:10:50 -04:00
Tom Limoncelli
198cc258d8 Gandi: Fix broken PTR tests. (#188) 2017-08-22 12:45:40 -07:00
Tom Limoncelli
4570e0e404 Fix Gandi's MX handling. 2017-08-05 13:21:57 -04:00
Tom Limoncelli
d55b20ecdb Add SRV Record Type (#136)
* Add support for SRV records for NAMEDOTCOM and ROUTE53.
* Improve docs
* Rename RR() to ToRR().
* Rename RecordConfig Priority to MxPreference (affects json IR data)
2017-07-19 15:53:40 -04:00
Tom Limoncelli
2b93e6725f Gandi does not support TTLs > 30 days (#139)
* Fix https://github.com/StackExchange/dnscontrol/issues/108

TODO(tlim): Add tests.

* fixup!
2017-06-12 11:38:26 -04:00
Craig Peterson
d205c8b4ed Adding gandi to integration suite. Fixing bugs. (#57)
* Adding gandi to integration suite. Fixing bugs.
Fixes #35
Fixes #36

* small fixes

* gandi docs
2017-03-27 16:03:01 -06:00
Craig Peterson
12f006441b Refactoring diff package interface (#22)
* initial refactoring of diffing

* making cloudflare and others compile

* gandi and gcloud. no idea if gandi works anymore.

* r53

* namedotcom wasn't working.
2017-01-11 12:38:07 -07:00
Craig Peterson
1ea80d5347 Nameserver overhaul (#17)
* go changes to support nameservers_from

* clear nameservers before giving to dsp.

* work

* work

* nameserver updates.

* remove unused

* name.com stinks at NS records.

* whitespace

* removing web(belongs in own repo). First sketch of DSP vs NAMESERVER_FROM

* add DEFAULTS to replace defaultDsps.

* initial gcloud provider. Simple records work.

* namedotcom can do subdomain ns records now.

* fix for mx and txt

* kill dsp acronym
2016-12-16 13:10:27 -07:00
Craig Peterson
ef0bbf53af migrate code for github 2016-08-22 18:31:50 -06:00