Repository: favonia/cloudflare-ddns
Pull request #352 (2023-01-04 05:03:45)

build(deps): bump github.com/cloudflare/cloudflare-go from 0.57.1 to 0.58.0
Bumps [github.com/cloudflare/cloudflare-go](https://github.com/cloudflare/cloudflare-go) from 0.57.1 to 0.58.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/cloudflare/cloudflare-go/releases">github.com/cloudflare/cloudflare-go's releases</a>.</em></p>
<blockquote>
<h2>v0.58.0</h2>
<p>BREAKING CHANGES:</p>
<ul>
<li>dns: <code>DNSRecord</code> has been renamed to <code>GetDNSRecord</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>dns: <code>DNSRecords</code> has been renamed to <code>ListDNSRecords</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>dns: method signatures have been updated to align with the upcoming client conventions (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>origin_ca: renamed to <code>CreateOriginCertificate</code> to <code>CreateOriginCACertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>OriginCARootCertificate</code> to <code>GetOriginCARootCertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>OriginCertificate</code> to <code>GetOriginCACertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>OriginCertificates</code> to <code>ListOriginCACertificates</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>RevokeOriginCertificate</code> to <code>RevokeOriginCACertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
</ul>
<p>ENHANCEMENTS:</p>
<ul>
<li>dns: add support for tags and comments (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>mtls_certificate: add support for managing mTLS certificates and assocations (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1150">#1150</a>)</li>
<li>origin_ca: add support for using API keys, API tokens or API User service keys for interacting with Origin CA endpoints (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>workers: Add support for workers logpush enablement on script upload (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1160">#1160</a>)</li>
</ul>
<p>BUG FIXES:</p>
<ul>
<li>email_routing_destination: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>email_routing_rules: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>filter: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>firewall_rules: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>lockdown: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>queue: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>teams_list: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>workers_kv: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
</ul>
<p>DEPENDENCIES:</p>
<ul>
<li>deps: bumps github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1162">#1162</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/cloudflare/cloudflare-go/blob/master/CHANGELOG.md">github.com/cloudflare/cloudflare-go's changelog</a>.</em></p>
<blockquote>
<h2>0.58.0 (January 4th, 2023)</h2>
<p>BREAKING CHANGES:</p>
<ul>
<li>dns: <code>DNSRecord</code> has been renamed to <code>GetDNSRecord</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>dns: <code>DNSRecords</code> has been renamed to <code>ListDNSRecords</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>dns: method signatures have been updated to align with the upcoming client conventions (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>origin_ca: renamed to <code>CreateOriginCertificate</code> to <code>CreateOriginCACertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>OriginCARootCertificate</code> to <code>GetOriginCARootCertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>OriginCertificate</code> to <code>GetOriginCACertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>OriginCertificates</code> to <code>ListOriginCACertificates</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>origin_ca: renamed to <code>RevokeOriginCertificate</code> to <code>RevokeOriginCACertificate</code> (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
</ul>
<p>ENHANCEMENTS:</p>
<ul>
<li>dns: add support for tags and comments (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1151">#1151</a>)</li>
<li>mtls_certificate: add support for managing mTLS certificates and assocations (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1150">#1150</a>)</li>
<li>origin_ca: add support for using API keys, API tokens or API User service keys for interacting with Origin CA endpoints (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a>)</li>
<li>workers: Add support for workers logpush enablement on script upload (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1160">#1160</a>)</li>
</ul>
<p>BUG FIXES:</p>
<ul>
<li>email_routing_destination: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>email_routing_rules: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>filter: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>firewall_rules: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>lockdown: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>queue: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>teams_list: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
<li>workers_kv: use empty reponse struct on each page call (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1156">#1156</a>)</li>
</ul>
<p>DEPENDENCIES:</p>
<ul>
<li>deps: bumps github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 (<a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1162">#1162</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/19b3f7ab6a6f268ce5c322a56b8a674808677474"><code>19b3f7a</code></a> Update CHANGELOG.md</li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/e2a4e000360f1ef3429ffd3bf3c2cbdca9492418"><code>e2a4e00</code></a> Update CHANGELOG.md for <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a></li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/6adbcf7d1d1c87c049284ee5c7d244c1547f3bae"><code>6adbcf7</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1161">#1161</a> from jacobbednarz/support-tokens-for-origin-certs</li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/9f773b1d9314071e2b5545f45454b6100193fe29"><code>9f773b1</code></a> Update CHANGELOG.md for <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1162">#1162</a></li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/531144ea176a5e8d60a9986081074decea440098"><code>531144e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1162">#1162</a> from cloudflare/dependabot/go_modules/github.com/has...</li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/b77c9f92b9b9e2794c380c0fc3e839db7007efe0"><code>b77c9f9</code></a> add CHANGELOG for <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1162">#1162</a></li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/d95d01b121dbac55a1431d48eff36dff079fb155"><code>d95d01b</code></a> build(deps): bump github.com/hashicorp/go-retryablehttp</li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/8802b7fedcb914b8eec37d6795efaa1624bda763"><code>8802b7f</code></a> origin_ca: remove the restriction of using API service keys</li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/c4ab0b6da6e055ab8c7ed8b2573341e55eb43c72"><code>c4ab0b6</code></a> Update CHANGELOG.md for <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1160">#1160</a></li>
<li><a href="https://github.com/cloudflare/cloudflare-go/commit/c15e13e523945bf57cf3ba3c44dd4852ca966475"><code>c15e13e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cloudflare/cloudflare-go/issues/1160">#1160</a> from ndisidore/nathan/feat/workers-logpush</li>
<li>Additional commits viewable in <a href="https://github.com/cloudflare/cloudflare-go/compare/v0.57.1...v0.58.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cloudflare/cloudflare-go&package-manager=go_modules&previous-version=0.57.1&new-version=0.58.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

codecov[bot]: # [Codecov](https://codecov.io/gh/favonia/cloudflare-ddns/pull/352?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) Report
> Merging [#352](https://codecov.io/gh/favonia/cloudflare-ddns/pull/352?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) (7e7bb77) into [main](https://codecov.io/gh/favonia/cloudflare-ddns/commit/9d298b0f495e862601cb70b8af3f6d9f16ded296?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) (9d298b0) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.

```diff
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
+ Coverage   87.88%   87.90%   +0.01%     
==========================================
  Files          32       32              
  Lines        2047     2050       +3     
==========================================
+ Hits         1799     1802       +3     
  Misses        236      236              
  Partials       12       12              
```

| Flag | Coverage Δ | |
|---|---|---|
| unittests | `87.90% <100.00%> (+0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/favonia/cloudflare-ddns/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia) | Coverage Δ | |
|---|---|---|
| [internal/api/cloudflare.go](https://codecov.io/gh/favonia/cloudflare-ddns/pull/352/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia#diff-aW50ZXJuYWwvYXBpL2Nsb3VkZmxhcmUuZ28=) | `100.00% <100.00%> (ø)` | |

:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=favonia)

dependabot[bot]: A newer version of github.com/cloudflare/cloudflare-go exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

Patch:
diff --git a/go.mod b/go.mod
index 98774d5..5552ff5 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/favonia/cloudflare-ddns
 go 1.19
 
 require (
-	github.com/cloudflare/cloudflare-go v0.57.1
+	github.com/cloudflare/cloudflare-go v0.58.0
 	github.com/golang/mock v1.6.0
 	github.com/hashicorp/go-retryablehttp v0.7.2
 	github.com/jellydator/ttlcache/v3 v3.0.1
diff --git a/go.sum b/go.sum
index b4a226b..abbb229 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-github.com/cloudflare/cloudflare-go v0.57.1 h1:c9OhL/WusagBirP+CIJeCqS7OjT9kiWjtJv4lwxp3ZM=
-github.com/cloudflare/cloudflare-go v0.57.1/go.mod h1:cD8AqNMMaL1A0Sj9XKo3Xu9ZVHwHqgXJofb1ya210GQ=
+github.com/cloudflare/cloudflare-go v0.58.0 h1:m6b12UxePZDtZhcKXMGpzgvFzXLUqlI9u0/uiSP03as=
+github.com/cloudflare/cloudflare-go v0.58.0/go.mod h1:QaA8x4JI0/gA/tni1nTdyimFuyEGJi8cB7YSGoFhXFo=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
diff --git a/internal/api/cloudflare.go b/internal/api/cloudflare.go
index 7c3648a..0b4e8c7 100644
--- a/internal/api/cloudflare.go
+++ b/internal/api/cloudflare.go
@@ -180,10 +180,12 @@ func (h *CloudflareHandle) ListRecords(ctx context.Context, ppfmt pp.PP,
 	}
 
 	//nolint:exhaustruct // Other fields are intentionally unspecified
-	rs, err := h.cf.DNSRecords(ctx, zone, cloudflare.DNSRecord{
-		Name: domain.DNSNameASCII(),
-		Type: ipNet.RecordType(),
-	})
+	rs, _, err := h.cf.ListDNSRecords(ctx,
+		cloudflare.ZoneIdentifier(zone),
+		cloudflare.ListDNSRecordsParams{
+			Name: domain.DNSNameASCII(),
+			Type: ipNet.RecordType(),
+		})
 	if err != nil {
 		ppfmt.Warningf(pp.EmojiError, "Failed to retrieve records of %q: %v", domain.Describe(), err)
 		return nil, false
@@ -212,7 +214,7 @@ func (h *CloudflareHandle) DeleteRecord(ctx context.Context, ppfmt pp.PP,
 		return false
 	}
 
-	if err := h.cf.DeleteDNSRecord(ctx, zone, id); err != nil {
+	if err := h.cf.DeleteDNSRecord(ctx, cloudflare.ZoneIdentifier(zone), id); err != nil {
 		ppfmt.Warningf(pp.EmojiError, "Failed to delete a stale %s record of %q (ID: %s): %v",
 			ipNet.RecordType(), domain.Describe(), id, err)
 
@@ -238,13 +240,14 @@ func (h *CloudflareHandle) UpdateRecord(ctx context.Context, ppfmt pp.PP,
 	}
 
 	//nolint:exhaustruct // Other fields are intentionally omitted
-	payload := cloudflare.DNSRecord{
+	params := cloudflare.UpdateDNSRecordParams{
+		ID:      id,
 		Name:    domain.DNSNameASCII(),
 		Type:    ipNet.RecordType(),
 		Content: ip.String(),
 	}
 
-	if err := h.cf.UpdateDNSRecord(ctx, zone, id, payload); err != nil {
+	if err := h.cf.UpdateDNSRecord(ctx, cloudflare.ZoneIdentifier(zone), params); err != nil {
 		ppfmt.Warningf(pp.EmojiError, "Failed to update a stale %s record of %q (ID: %s): %v",
 			ipNet.RecordType(), domain.Describe(), id, err)
 
@@ -270,7 +273,7 @@ func (h *CloudflareHandle) CreateRecord(ctx context.Context, ppfmt pp.PP,
 	}
 
 	//nolint:exhaustruct // Other fields are intentionally omitted
-	payload := cloudflare.DNSRecord{
+	params := cloudflare.CreateDNSRecordParams{
 		Name:    domain.DNSNameASCII(),
 		Type:    ipNet.RecordType(),
 		Content: ip.String(),
@@ -278,7 +281,7 @@ func (h *CloudflareHandle) CreateRecord(ctx context.Context, ppfmt pp.PP,
 		Proxied: &proxied,
 	}
 
-	res, err := h.cf.CreateDNSRecord(ctx, zone, payload)
+	res, err := h.cf.CreateDNSRecord(ctx, cloudflare.ZoneIdentifier(zone), params)
 	if err != nil {
 		ppfmt.Warningf(pp.EmojiError, "Failed to add a new %s record of %q: %v",
 			ipNet.RecordType(), domain.Describe(), err)


Test patch:
diff --git a/internal/api/cloudflare_test.go b/internal/api/cloudflare_test.go
index 06b3a93..8a24a06 100644
--- a/internal/api/cloudflare_test.go
+++ b/internal/api/cloudflare_test.go
@@ -564,9 +564,10 @@ func TestListRecords(t *testing.T) {
 			require.Equal(t, http.MethodGet, r.Method)
 			require.Equal(t, []string{fmt.Sprintf("Bearer %s", mockToken)}, r.Header["Authorization"])
 			require.Equal(t, url.Values{
-				"name": {"sub.test.org"},
-				"page": {"1"},
-				"type": {ipNet.RecordType()},
+				"name":     {"sub.test.org"},
+				"page":     {"1"},
+				"per_page": {"50"},
+				"type":     {ipNet.RecordType()},
 			}, r.URL.Query())
 
 			w.Header().Set("content-type", "application/json")
@@ -615,9 +616,10 @@ func TestListRecordsInvalidIPAddress(t *testing.T) {
 			require.Equal(t, http.MethodGet, r.Method)
 			require.Equal(t, []string{fmt.Sprintf("Bearer %s", mockToken)}, r.Header["Authorization"])
 			require.Equal(t, url.Values{
-				"name": {"sub.test.org"},
-				"page": {"1"},
-				"type": {ipNet.RecordType()},
+				"name":     {"sub.test.org"},
+				"page":     {"1"},
+				"per_page": {"50"},
+				"type":     {ipNet.RecordType()},
 			}, r.URL.Query())
 
 			w.Header().Set("content-type", "application/json")
@@ -680,9 +682,10 @@ func TestListRecordsWildcard(t *testing.T) {
 			require.Equal(t, http.MethodGet, r.Method)
 			require.Equal(t, []string{fmt.Sprintf("Bearer %s", mockToken)}, r.Header["Authorization"])
 			require.Equal(t, url.Values{
-				"name": {"*.test.org"},
-				"page": {"1"},
-				"type": {ipNet.RecordType()},
+				"name":     {"*.test.org"},
+				"page":     {"1"},
+				"per_page": {"50"},
+				"type":     {ipNet.RecordType()},
 			}, r.URL.Query())
 
 			w.Header().Set("content-type", "application/json")