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

feat(provider): add support for Vultr #829

Merged
merged 40 commits into from
Oct 20, 2024
Merged

feat(provider): add support for Vultr #829

merged 40 commits into from
Oct 20, 2024

Conversation

amroessam
Copy link
Contributor

@amroessam amroessam commented Oct 2, 2024

First time writing go, this was easy thanks to great docs and example 🙏🏽
Go easy on the roast 😛

Vultr DNS API docs for ref

Excited for the merge, so I can use this instead of my janky script https://github.com/amroessam/vultr-ddns

@amroessam
Copy link
Contributor Author

Preemptively answering these questions

  1. Yes, the default behavior is to create the record if it doesn't exist
  2. Yes, I've tested it
  3. Wildcards are supported but only for 1 record type, if it errors out it should reflect the error

@amroessam
Copy link
Contributor Author

@qdm12 any luck getting to this? 🙏🏽

Copy link
Owner

@qdm12 qdm12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! Thanks for the PR and congrats on your first few Go steps! 💯
Looking pretty good, with a few minor changes to make 😉

.gitignore Outdated Show resolved Hide resolved
docs/vultr.md Outdated Show resolved Hide resolved
docs/vultr.md Outdated Show resolved Hide resolved
docs/vultr.md Outdated Show resolved Hide resolved
docs/vultr.md Outdated Show resolved Hide resolved
internal/provider/providers/vultr/provider.go Show resolved Hide resolved
internal/provider/providers/vultr/provider.go Outdated Show resolved Hide resolved
internal/provider/providers/vultr/provider.go Outdated Show resolved Hide resolved
internal/provider/providers/vultr/provider.go Outdated Show resolved Hide resolved
internal/provider/providers/vultr/provider.go Outdated Show resolved Hide resolved
decoder := json.NewDecoder(response.Body)
var parsedJSON struct {
Error string
Status uint32
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also what is that Status used for? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the HTTP status code

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that's weird 😄 Should we... remove it from that struct?? Since it's... well, in the HTTP response already...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of implementing the API, I've added it, can remove it if you insist 🙏🏽

internal/provider/providers/vultr/provider.go Outdated Show resolved Hide resolved
docs/vultr.md Outdated Show resolved Hide resolved
docs/vultr.md Outdated Show resolved Hide resolved
@amroessam
Copy link
Contributor Author

Sorry for the delay, I was away. Can you recheck?

@qdm12 qdm12 force-pushed the master branch 2 times, most recently from 126315b to 691ed32 Compare October 20, 2024 13:15
@qdm12
Copy link
Owner

qdm12 commented Oct 20, 2024

Hey there, thanks for the last few commits!
In the end I decided to push directly on your branch, since there were quite a few things to change (ranging from not important at all to somewhat important - see commits with fix: prefix). Feel free to browse commit by commit, since I tried my best to separate changes one by one for knowledge sharing purposes!
I also rebased your branch on the master branch here, so feel free to get changes using git checkout master; git fetch; git reset --hard origin/master 😉
Just waiting for the CI to pass and I'll merge this. Thanks!

@qdm12 qdm12 merged commit 949dcd9 into qdm12:master Oct 20, 2024
7 checks passed
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.

3 participants