Skip to content

feat(provider): add support for Vultr - #829

Merged
qdm12 merged 40 commits into
qdm12:masterfrom
amroessam:master
Oct 20, 2024
Merged

qdm12 merged 40 commits into
qdm12:masterfrom
amroessam:master

Conversation

@amroessam

@amroessam amroessam commented Oct 2, 2024 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor Author

@qdm12 any luck getting to this? 🙏🏽

@qdm12 qdm12 left a comment

Copy link
Copy Markdown
Owner

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 😉

Comment thread .gitignore Outdated
Comment thread docs/vultr.md Outdated
Comment thread docs/vultr.md Outdated
Comment thread docs/vultr.md Outdated
Comment thread docs/vultr.md Outdated
Comment thread internal/provider/providers/vultr/provider.go
Comment thread internal/provider/providers/vultr/provider.go Outdated
Comment thread internal/provider/providers/vultr/provider.go Outdated
Comment thread internal/provider/providers/vultr/provider.go Outdated
Comment thread internal/provider/providers/vultr/provider.go Outdated
decoder := json.NewDecoder(response.Body)
var parsedJSON struct {
Error string
Status uint32

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 🙏🏽

Comment thread internal/provider/providers/vultr/provider.go Outdated
Comment thread docs/vultr.md Outdated
Comment thread docs/vultr.md Outdated
@amroessam

Copy link
Copy Markdown
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

qdm12 commented Oct 20, 2024

Copy link
Copy Markdown
Owner

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
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