mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 02:28:40 -04:00
Feature request: API HTTP server #42
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @qdm12 on GitHub (May 30, 2020).
Originally assigned to: @qdm12 on GitHub.
Setup a simple HTTP server to serve information and modify settings
Such that it can be used as an API consumed by the web ui react frontend
@fredericrous commented on GitHub (Jan 27, 2021):
I did a quick look online and the Iris framework seems to be a good choice for an API https://github.com/kataras/iris
It is actively maintained, very few issues are opened, there are loads of up to date examples. It looks easy to use/implement. What do you think?
@qdm12 commented on GitHub (Jan 27, 2021):
Ehh sorry to disappoint, but I'd like to stay away from frameworks. Especially we just need I think a GET, POST and PUT endpoints and call it a day 👍 I'm fine with adding a (good, idiomatic, close to the Go standard library) router like go-chi though.
I'm very used to write HTTP servers in Go, what I can do is lay some foundations and then you can fill it up? But that will probably have to wait until the weekend 😄
@fredericrous commented on GitHub (Jan 27, 2021):
I was suggesting Iris because it looks super easy and readable from what I read from the section "Simple Handler" of their Readme.md . Also, I believe the go compiler removes unused code so using a framework shouldn't introduce too much heaviness. Anyway, I'm afraid to write an API in Go without structure, that's the main reason I suggested a framework. If you lay down some foundation I sure will be happy to help
@qdm12 commented on GitHub (Jan 27, 2021):
Totally understandable. It took me a while to figure a good structure, and I constantly see oddities in how HTTP servers are implemented / non testable. So it is not trivial indeed 😄
Right now I'm in the middle of solving #136 and will get to the HTTP server right after.
@jdevera commented on GitHub (Aug 18, 2024):
I came to suggest a similar feature. In my case, I would only need read support on such API. My goal is to show a summary in a Homepage widget so I can see if everything is fine or if something needs my attention.
Perhaps this could come as a first iteration before considering config changes 👼 .
@Robonau commented on GitHub (Nov 11, 2024):
even a simple json version of what is already on the current page would be fine.
just
on /api
would be fine