Skip to content

New provider: mittwald - #17

Closed
twiesing wants to merge 2 commits into
libdns:masterfrom
mittwald:mittwald-provider
Closed

twiesing wants to merge 2 commits into
libdns:masterfrom
mittwald:mittwald-provider

Conversation

@twiesing

Copy link
Copy Markdown

Provider for mittwald mStudio.

libdns/libdns#230

  • provider.go: the libdns interfaces and ZoneLister
  • convert.go: mStudio record sets ↔ libdns record types, TTL handling
  • client.go: calls of the official client github.com/mittwald/api-client-go and the transport (rate limit, If-Event-Reached, retries)
  • provider_test.go: unit tests against a fake API
  • libdnstest/: the libdns test suite against a live domain, as a separate module

Implements the libdns record interfaces and ZoneLister for mittwald
mStudio with the official client github.com/mittwald/api-client-go.

mStudio keeps one DNS zone per name with one record set per type (A and
AAAA together, CNAME, MX, TXT, SRV, CAA); records are read, merged and
written per set. Sets managed by mStudio are not returned.

The transport follows the rate limit headers, sends the event of the
last write as If-Event-Reached and repeats a few recoverable responses,
failing fast instead of waiting long, as libdns asks.

Tested with unit tests against a fake API and with libdnstest against
a real mStudio domain.
- TTLs are clamped to 60s..1 day, and the TTL written applies to the
  whole record set (A and AAAA share one), as with libdns/hetzner and
  libdns/ovh; DeleteRecords no longer compares TTLs.
- The zone of a name whose last record goes is deleted, except the
  domain's own zone, a zone with a set mStudio manages and a zone with
  zones below it. A CAA set is unset first: mStudio refuses CAA for a
  name for good once its zone was deleted with a CAA set.
- 412 is only repeated while the awaited event is not reached; a
  conflict such as a CNAME next to other records is final.
- Delete filters without data, exact duplicate check on append, zone
  names in any spelling, context-aware waiting for other calls, changes
  limited to the requested zone.

@gucci-on-fleek gucci-on-fleek left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great; thanks for the contribution! I've created a new repo at libdns/mittwald and given you access.

Comment thread convert.go
Comment thread provider.go
@gucci-on-fleek

Copy link
Copy Markdown
Member

@mholt: I was able to create the new libdns repo, but I don't appear to be able to close this PR, so could you please close it?

@twiesing

Copy link
Copy Markdown
Author

Thanks a lot for the quick and uncomplicated review! I'll wait for the caddy-dns repo and push the module as soon as it's there.

@twiesing

Copy link
Copy Markdown
Author

Finalized the caddy module. Can you create the repo @mholt?

@mholt

mholt commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@gucci-on-fleek Thanks for reviewing and for the ping! I've elevated your privileges so you won't be blocked by me. However do not feel obligated in any way of course :)

@twiesing Thank you for the contribution -- I have also created a caddy-dns repository for you.

@mholt mholt closed this Sep 24, 2026
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