-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEW PROVIDER: Gcore DNS #1816
NEW PROVIDER: Gcore DNS #1816
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! Just 1 change (repeated 3 times).
providers/gcore/convert.go
Outdated
switch recType { | ||
case "CAA": // G-Core API don't need quotes around CAA with whitespace | ||
if len(value.Content) != 3 { | ||
panic("incorrect number of fields in G-Core's CAA record") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please return an error instead of calling panic().
providers/gcore/convert.go
Outdated
|
||
flag, tag, target := parts[0], parts[1], parts[2] | ||
if err := rc.SetTargetCAAStrings(flag, tag, target); err != nil { | ||
panic(fmt.Errorf("unparsable record received from G-Core: %w", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please return an error instead of calling panic().
providers/gcore/convert.go
Outdated
|
||
default: // "A", "AAAA", "CAA", "NS", "CNAME", "MX", "PTR", "SRV", "TXT" | ||
if err := rc.PopulateFromString(recType, value.ContentToString(), zoneName); err != nil { | ||
panic(fmt.Errorf("unparsable record received from G-Core: %w", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please return an error instead of calling panic().
Thanks for your feedback! That has been fixed. |
Excellent! Thanks for the contribution! It's always a pleasure to get a new provider added to the project! |
This PR adds support for Gcore DNS (https://gcore.com/dns) using their Golang SDK.
Code is based on deSEC provider, since Gcore performs incremental-label-type updates.
Passes all integration tests, and tested on my own domain.