New provider and new registrar: hosting.de#1041
Conversation
tlimoncelli
left a comment
There was a problem hiding this comment.
Great so far! Some minor feedback.
|
http.net is connected deeply to hosting.de ("their" consumer-facing business) and they share the same API. I could add a provider for hosting.de very easily. How should I go about doing this without copying the code? |
3d78e9c to
bb33f78
Compare
|
hosting.de + http.net: I don't have a preference for 1 or 2 providers. Is it likely that they would diverge? If not, one provider is better. |
|
I think it is unlikely for them to diverge regarding the DNS and domain APIs. I am thinking about letting the user specify the API endpoint for maximum flexibility (e.g. ability to use it with their demo systems) and maybe optionally set a different set of default nameservers (honestly not that important as they are the same servers with the same IP addresses). |
|
Allowing the user to specify the API endpoint sounds like the best solution. Many providers permit one to specify the endpoint to change to a testing environment, etc. (Namecheap, NameDotCom, PowerDNS are examples.) |
|
Done. Extended the docs as well. |
|
Hello @tlimoncelli, I am from hosting.de / http.net. We gladly support this plugin. I have talked to @juliusrickert and he will rename/relabel it to hosting.de. It would be great if you could merge this plugin after renaming. We will take over support and further development after that. |
- Fix EnsureDomainExists - GetNameservers read from NS Records
tlimoncelli
left a comment
There was a problem hiding this comment.
Hi there!
I'm super excited to hear you'll be supporting this!
I made a few small suggestions about the code. HTH
| providers/hedns @rblenkinsopp | ||
| providers/hetzner @das7pad | ||
| providers/hexonet @papakai | ||
| providers/httpnet @juliusrickert |
There was a problem hiding this comment.
Change to providers/hostingde ?
| - Hetzner | ||
| - HEXONET | ||
| - Hurricane Electric DNS | ||
| - http.net |
There was a problem hiding this comment.
Change to - hosting.de / http.net ?
| * `HEDNS` @rblenkinsopp | ||
| * `HETZNER` @das7pad | ||
| * `HEXONET` @papakai | ||
| * `HTTPNET` @juliusrickert |
Contributor Support from hosting.de
|
Thanks! I have updated these lines. |
|
|
||
| **If you want to use this provider with http.net or a demo system you need to provide a custom `baseURL`.** | ||
|
|
||
| * http.net: `https://partner.http.net` |
There was a problem hiding this comment.
Suggestion: Add a bullet:
- Hosting.de: default
| jsId: hostingde | ||
| --- | ||
| # hosting.de Provider | ||
|
|
There was a problem hiding this comment.
Suggestion: Add a paragraph saying that this provider suports the API used by Hosting.de and http.net, which both use the same API. (or whatever)
There was a problem hiding this comment.
I do not think that this is neccessary. http.net only provides registration services for bigger companies. Also http.net is mentioned later in the documentation.
| func (hp *hostingdeProvider) getDomainConfig(domain string) (*domainConfig, error) { | ||
| zc, err := hp.getZoneConfig(domain) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("error getting zone config: %v", err) |
There was a problem hiding this comment.
Done. I have replaced all of them.
|
|
||
| resp, err := hp.get("domain", "domainsFind", params) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("error getting domain info: %v", err) |
|
|
||
| domainConf := []*domainConfig{} | ||
| if err := json.Unmarshal(resp.Data, &domainConf); err != nil { | ||
| return nil, fmt.Errorf("error parsing response: %v", err) |
|
|
||
| zc := []*zoneConfig{} | ||
| if err := json.Unmarshal(resp.Data, &zc); err != nil { | ||
| return nil, fmt.Errorf("could not parse response: %v", err) |
| // Nothing special. | ||
| case "MX": | ||
| record.Priority = rc.MxPreference | ||
| record.Content = rc.Target |
There was a problem hiding this comment.
Rather than rc.Target, please use rc.GetTargetFrield()
For TXT records, please use .TxtStrings (which may require special handling, since it is a []string)
TXT handling will change in a few days. It might break this code. See #1063
There was a problem hiding this comment.
Done. Once you merge the tlim_target_and_txt branch I will create an auditrecords.go.
replaced %v with %w for errors special handling for txt records using .TxtStrings
fixed Trim of last dot
|
Please rebase (i.e. |
|
Yay! Another new provider! Thank you for contributing this! |
* Add http.net provider * Rename httpnetProvider * Add SSHFP capability * Add paging for records * Sort documentation notes alphabetically * Add custom base URL * Extend documentation for custom base URL * - renamed to hosting.de - Fix EnsureDomainExists - GetNameservers read from NS Records * Replaced http.net with hosting.de Contributor Support from hosting.de * baseURL for hosting.de in documentation replaced %v with %w for errors special handling for txt records using .TxtStrings * removed last references to rc.Target fixed Trim of last dot * Re-engineer TXT records for simplicity and better compliance (#1063) Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com> Co-authored-by: Oliver Dick <o.dick@hosting.de> Co-authored-by: Oliver Dick <31733320+membero@users.noreply.github.com>
No description provided.