Skip to content
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

Merged
merged 4 commits into from
Nov 15, 2022
Merged

NEW PROVIDER: Gcore DNS #1816

merged 4 commits into from
Nov 15, 2022

Conversation

xddxdd
Copy link
Contributor

@xddxdd xddxdd commented Nov 14, 2022

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.

Copy link
Contributor

@tlimoncelli tlimoncelli left a 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).

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")
Copy link
Contributor

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().


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))
Copy link
Contributor

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().


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))
Copy link
Contributor

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().

@xddxdd
Copy link
Contributor Author

xddxdd commented Nov 15, 2022

Thanks for your feedback! That has been fixed.

@tlimoncelli
Copy link
Contributor

Excellent!

Thanks for the contribution! It's always a pleasure to get a new provider added to the project!

@tlimoncelli tlimoncelli merged commit 3581829 into StackExchange:master Nov 15, 2022
@xddxdd xddxdd deleted the gcore branch November 15, 2022 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants