From 5ae94b5c086f1824a9f171b5f97c637c449af75a Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Sep 2022 15:32:00 +0200 Subject: [PATCH] CSC Global --- providers/CscGlobalAPI.png | Bin 0 -> 2997 bytes providers/cscglobal.go | 67 +++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 providers/CscGlobalAPI.png create mode 100644 providers/cscglobal.go diff --git a/providers/CscGlobalAPI.png b/providers/CscGlobalAPI.png new file mode 100644 index 0000000000000000000000000000000000000000..c695e0793c7644b2b2117491dfc93cf0741f596a GIT binary patch literal 2997 zcmV;m3rh5fP);o{`w=A53Oxx2jm{r$tl#ck8hqNJw8#m4OI?E*br>iPKF+uRC5Vx{EaReX}} z`uW+}+Dpm8>+tgU`1m`-y|d`$yS%>2%gm*xse{_p@$vCUa*8#=yRoyh+}z#N)zw;n zmcPNm$JE;hw5;#%@ZRO5(Jwzs(lKwtzuU%Be%F2K1LO>3#W$U(-xSIoxn z@bE0ZxX#(%;`jDvik^3tsF|_8VTPJ?l%^(Fbe68XE?#-4yvL!p!-b)-V1=2u$kLkO z-NC}ch@`W($k9W_z`M)T%J1#f*4O;}{Km(~!_nCgM`jYYuOq#+t*@|fk)-3~ z=lJ*Q?ChcA-$HJN_x=3b-QLK_$}?hp?(Xj&Q*he!^A5MJtgf%#-{0o<_xASo>gwwR zv#QnA)_$C=RLjMTr?uqj?$+1W==k?gc#p8Mv+(ovrn|H7QpK5K+FWq%n?Y>=wB&G7Ef+u?YZskXSe=k4&c#n1fx{hYJFilww{j-hCap32tU zUW1r{p0DHS?NQ3a_xbw4&)3D$+G5bk=;-M>Xo0=V)!gLi*x}~E?CPJj!lSsvy2{h8 zu(6b_yV~RD@$~jtf0eAi%Alg8*Wl&J)!gp#^ycjEj;Oa$d63)V=-=k+nw*}B+}Ogy z#m>*rk>1+Z*x8b+xmSLa`T6<+v#MOq$Pq|qPIr#0=Huz^@%;Y&Sk1>dXMla!)4$Hv zv$VGD?(U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~Pf_k%*+iB{vT`%=lpIH#H(EJga-ZYUSjfG0dk1)QGU6uXK!cGSFob ziNp>@2ySd-@C+RvYSh3bOKIqoJW^bZSH_b)I~i7o?YX0VfL2v1BU- zIgt!IpA^S(og4g2{*2P_65pjP|4VQal$cu|=kKFKhTe})t^q`lq!o?bFXPELZ*h_d zg@+-tf?t(?g%_V<07!v|b4m`ei*j#-)e+2okuA}MZ{fL9M10A(c~ZnUC@eb2C~1^x zviVlX62i>I&pt1~?>iDsd^s^fgNP=EGh()9KbFRlmXY~}0oJu_>Fnfo+MxEXGj@csrR_!ATjhZ|%w zk5ZTKU$7^eY4R=x_ka@)We+^nw&=bH7|7&n3OP9=?j|Sn?gr9a$w_is5%0C3Nd_k} rS2T0`QPgN@n9mGmE1Lfpdg$R72!gErTP}r200000NkvXXu0mjfW;-da literal 0 HcmV?d00001 diff --git a/providers/cscglobal.go b/providers/cscglobal.go new file mode 100644 index 0000000..e1af4b3 --- /dev/null +++ b/providers/cscglobal.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/cscglobal" + + "git.happydns.org/happydomain/model" +) + +type CscGlobalAPI struct { + ApiKey string `json:"ApiKey,omitempty" happydomain:"label=API key,placeholder=xxxxxxxx,required,description=Your API key"` + UserToken string `json:"UserToken,omitempty" happydomain:"label=User token,placeholder=xxxxxxxx,required,description=Your user token"` + NotificationEmails string `json:"NotificationEmails,omitempty" happydomain:"label=Notification emails,placeholder=xxxxxxxx,description=Optional comma-separated list of email addresses to send notifications to"` +} + +func (s *CscGlobalAPI) NewDNSServiceProvider() (providers.DNSServiceProvider, error) { + config := map[string]string{ + "api-key": s.ApiKey, + "user-token": s.UserToken, + "notification_emails": s.NotificationEmails, + } + return providers.CreateDNSProvider(s.DNSControlName(), config, nil) +} + +func (s *CscGlobalAPI) DNSControlName() string { + return "CSCGLOBAL" +} + +func init() { + RegisterProvider(func() happydns.Provider { + return &CscGlobalAPI{} + }, ProviderInfos{ + Name: "CSC Global", + Description: "Corporation Service Company (CSC) provides various business, legal, and financial services.", + }) +}