From e85b2a846949d680c800ad79ca8b39d3beb5ad7f Mon Sep 17 00:00:00 2001 From: David Date: Tue, 17 May 2022 16:13:41 +0200 Subject: [PATCH] Add AutoDNS provider --- providers/AutoDNS.go | 67 +++++++++++++++++++++++++++++++++++++++ providers/AutoDNSAPI.png | Bin 0 -> 5663 bytes 2 files changed, 67 insertions(+) create mode 100644 providers/AutoDNS.go create mode 100644 providers/AutoDNSAPI.png diff --git a/providers/AutoDNS.go b/providers/AutoDNS.go new file mode 100644 index 0000000..599bddf --- /dev/null +++ b/providers/AutoDNS.go @@ -0,0 +1,67 @@ +// Copyright or © or Copr. happyDNS (2021) +// +// contact@happydomain.org +// +// This software is a computer program whose purpose is to provide a modern +// interface to interact with DNS systems. +// +// This software is governed by the CeCILL license under French law and abiding +// by the rules of distribution of free software. You can use, modify and/or +// redistribute the software under the terms of the CeCILL license as +// circulated by CEA, CNRS and INRIA at the following URL +// "http://www.cecill.info". +// +// As a counterpart to the access to the provider code and rights to copy, modify +// and redistribute granted by the license, users are provided only with a +// limited warranty and the software's author, the holder of the economic +// rights, and the successive licensors have only limited liability. +// +// In this respect, the user's attention is drawn to the risks associated with +// loading, using, modifying and/or developing or reproducing the software by +// the user in light of its specific status of free software, that may mean +// that it is complicated to manipulate, and that also therefore means that it +// is reserved for developers and experienced professionals having in-depth +// computer knowledge. Users are therefore encouraged to load and test the +// software's suitability as regards their requirements in conditions enabling +// the security of their systems and/or data to be ensured and, more generally, +// to use and operate it in the same conditions as regards security. +// +// The fact that you are presently reading this means that you have had +// knowledge of the CeCILL license and that you accept its terms. + +package providers // import "happydns.org/providers" + +import ( + "github.com/StackExchange/dnscontrol/v3/providers" + _ "github.com/StackExchange/dnscontrol/v3/providers/autodns" + + "git.happydns.org/happydomain/model" +) + +type AutoDNSAPI struct { + Username string `json:"username,omitempty" happydomain:"label=Username,placeholder=autodns.service-account@example.com,required,description=Your AutoDNS user name."` + Password string `json:"password,omitempty" happydomain:"label=Password,placeholder=xxxxxxxx,required,description=Your AutoDNS password."` + Context string `json:"context,omitempty" happydomain:"label=Context,placeholder=33004,description=Your AutoDNS context."` +} + +func (s *AutoDNSAPI) NewDNSServiceProvider() (providers.DNSServiceProvider, error) { + config := map[string]string{ + "username": s.Username, + "password": s.Password, + "context": s.Context, + } + return providers.CreateDNSProvider(s.DNSControlName(), config, nil) +} + +func (s *AutoDNSAPI) DNSControlName() string { + return "AUTODNS" +} + +func init() { + RegisterProvider(func() happydns.Provider { + return &AutoDNSAPI{} + }, ProviderInfos{ + Name: "AutoDNS / InterNetX", + Description: "German hosting provider.", + }) +} diff --git a/providers/AutoDNSAPI.png b/providers/AutoDNSAPI.png new file mode 100644 index 0000000000000000000000000000000000000000..6dd8fc4e8a6dcdcabeed580e79cafaf7d215f3d0 GIT binary patch literal 5663 zcmY*d2T)T@*WM(6p$92aC5X}m=^a7`r6^rN5J9?>(0f!w1i?@Qq)Qc~OO>WVB!F~~ zj`ZHEfWV*ceZQH1zMZ){_t`yVcFsBX+H`4565g%hB!s!D z+qee+`b8~OB}3n_jWp6EIvjl)zr{`yy-uqyi?$rxf+upYr{NW7^PKDzHAeV>Zt#r-OY3hwbWHRx4%;e#hE zs;*yRmZr%mUl_F-SGD1owpH&MMYv2Y?c50a#^=cYnY5363SKDaJNPw<=o~33OLIm6ItlWtq=kGpwIVWjT^8#$w1jC1F3Lhp7q`<+=?Ghtm{wf*G8?=? z%uBlrppby*IpKk#00It0A>rWJe^&k<5Ecl4Y_d@J7@8HsX)+?_VoraM+UW#W9m98hRy&Up8n*yot zN&KnujLx6uy1f;56X}$H5u&81cs<|~Cx^xKhWW};-G0-DV)t?FyuJ|9S23$8S;q(K}3WU%J8r|HnjF*vBkOt zF|bN8jsh{$Qfcd=oz$eI0|$To#!=-r!0f%Qt}YfDo-sqfB+e&KEQo-jZp&n>%m=P2 zQ(?^|I8IDxQNF8Dd1(spKmNg5-aWH9i~tjlC=O!HfBvd+z09gb;uVW0LsaiC&NUO8 z@l2Czm#~imqEQtlrVw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