Commit Graph

29 Commits

Author SHA1 Message Date
Kaan Barmore-Genç 5c6b38f7b0
Do retry update after a failure & fix tests (#94)
* Do retry update after a failure & fix tests

* Fix formatting

* Fix clippy errors

* Add codecov ignore for ip_source files
2023-02-13 00:58:23 -05:00
jannikac 8413555d2f
Implement thiserror and improve output formatting (#91)
* implemented an error struct with all possible errors using thiserror

* Replaced die_with with ClientError enum derived with thiserror.
This enables prettier and more structured error handling than anyhow

* Added proper parsing of Gandi API Responses.
This also makes it possible to output prettier logs.

* improved error message

* anyhow is better for main fn because it outputs anyhow errors correctly
2023-02-10 22:08:54 -05:00
Kaan Barmore-Genç 27a60d3ac2
Add new IP source "seeip" (#90) 2023-02-01 23:19:57 -05:00
Kaan Barmore-Genç 327b14a00a
Skip updating the IP address if it did not change (#88)
* Skip updating the IP address if it did not change

* Update readme
2023-02-01 02:00:09 -05:00
Kaan Barmore-Genç f8060fad42
Avoid multiple main versions & concurrently get ipv4 and ipv6 addresses (#87)
* Avoid having multiple versions of main run function

* Concurrently get ipv4 and ipv6 addresses
2023-02-01 00:21:02 -05:00
Kaan Barmore-Genç 7e7a9da65e
Switch back to die-exit (#86)
We had temporarily moved to die-exit-2, a forked release, but the
original project has made a release now!
2023-01-31 00:16:02 -05:00
Kaan Barmore-Genç 220e368bf3
Use async sleep & document the repeat option (#70)
* Use async sleep when long running

Using an async sleep just seems more appropriate as we are in an async
context, although the results are identical since gandi-live-dns only
uses a single thread.

* Document repeat option

* Fix lints
2022-12-18 01:35:54 -05:00
jannikac 041c1109e0
Fix linter suggestions (#68)
* removed unneeded lifetimes

* removed unneccessary imports

* removed unneccessary return statements

* added derive eq -> linter suggestion

* removed unneccessary references

* made code more concise

* ok_or_else instead of ok_or improves performance -> linter suggestion
2022-12-18 00:53:48 -05:00
jannikac bbd7ce347a
Add repeat flag (#67)
* Add a config option for the repeat flag

* Implement repeat flag
2022-12-18 00:53:34 -05:00
Kaan Barmore-Genç 1250e512f9
Update to forked die-exit to this can be published on crates.io 2022-11-13 16:18:32 -05:00
Kaan Barmore-Genç 5755aedc2f
Add CLI option to skip ipv4 or ipv6 (#58)
closes #7
2022-11-13 15:36:21 -05:00
Kaan Barmore-Genç eaabec35b4
Add option to use icanhazip as an IP source (#40)
* Add option to use icanhazip as an IP source

* skip IP source API tests in CI
2022-08-23 01:17:17 -04:00
Kaan Barmore-Genç 90c5485cce
Add first test (#38)
* wip

* wip implement test

* complete test

* add lint and test actions

* fix bad format
2022-08-22 22:20:10 -04:00
Kaan Barmore-Genç 21dcd000a7
Report record types
closes #2
2022-07-20 23:18:37 -04:00
Kaan Barmore-Genç 05a3fb6c89
Fix spawn local panic about local set 2022-06-09 22:11:42 -04:00
Kaan Barmore-Genç 661dfc55fd
Use a single threaded setup & allow configurable TTL (#21)
* use a single threaded executor

* add configurable TTL support
2022-06-09 21:29:02 -04:00
Kaan Barmore-Genç 4032fbe7ff update dependencies & switch to clap
`structopt` is maintanence-only, and `clap` seems to be the successor.
2022-04-03 21:27:45 -04:00
Kaan Barmore-Genç 2f9cdbd105 add rate limiting 2022-03-10 21:18:41 -05:00
Kaan Barmore-Genç 948521fcc4 fix incorrect name on version string 2022-01-30 04:48:24 -05:00
Kaan Genc 31d7d2e9ce fix API error 2022-01-23 22:29:32 -05:00
Kaan Genc 66642836fa fix config issues 2022-01-23 22:26:57 -05:00
Kaan Genc ecf08e3f28 fix type errors 2022-01-23 16:38:16 -05:00
Kaan Genc 3a7620b6d5 Use die-exit to clean up exits 2022-01-23 16:12:27 -05:00
Kaan Genc c5ed8fe6ab fix type issues with tasks 2022-01-23 03:22:41 -05:00
Kaan Genc 093b99d69d almost done! 2021-12-24 20:20:31 -05:00
Kaan Genc cab2ecbdf1 successfully made a request! 2021-12-14 22:30:36 -05:00
Kaan Genc cfe229234e organize into folders 2021-12-12 04:32:05 -05:00
Kaan Genc 68d992748e correct config loading 2021-12-12 03:49:21 -05:00
Kaan Genc 91c8463cd8 load config 2021-12-12 01:36:40 -05:00