Skip to content

Commit 5021e61

Browse files
authored
DIGITALOCEAN: self-documenting Cannot()s for unsupported features (#4029)
#3958 updated the digitalocean provider to make all of the feature flags explicit. Later I noticed that `Cannot()` can take an argument so that the reason for it can be seen by the end user. So now I have moved the reason into the argument instead of leaving it as a code-level comment. - `dnscontrol` rebuilt fine - `bin/generate-all.sh` picked up an unrelated file
1 parent e999c7f commit 5021e61

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

commands/types/dnscontrol.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier;
978978
* * `keytype` (string, optional): Key algorithm type. Maps to the `k=` tag. Default: `rsa`. Supported values:
979979
* * `rsa`
980980
* * `ed25519`
981-
* * `notes` (string, optional): Human-readable notes intended for administrators. Pass normal text here; DKIM-Quoted-Printable encoding will be applied automatically. Maps to the `n=` tag.
981+
* * `note` (string, optional): Human-readable notes intended for administrators. Pass normal text here; DKIM-Quoted-Printable encoding will be applied automatically. Maps to the `n=` tag.
982982
* * `servicetypes` (array, optional): Service types using this key. Maps to the `s=` tag. Supported values:
983983
* * `*`: explicitly allows all service types
984984
* * `email`: restricts key to email service only

providers/digitalocean/digitaloceanProvider.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ retry:
7373
var features = providers.DocumentationNotes{
7474
// The default for unlisted capabilities is 'Cannot'.
7575
// See providers/capabilities.go for the entire list of capabilities.
76-
providers.CanAutoDNSSEC: providers.Cannot(), // per docs
76+
providers.CanAutoDNSSEC: providers.Cannot("Digital Ocean documents that this is not supported."),
7777
providers.CanConcur: providers.Can(),
7878
providers.CanGetZones: providers.Can(),
79-
providers.CanUseAlias: providers.Cannot(), // per docs
79+
providers.CanUseAlias: providers.Cannot("Digital Ocean documents that this is not supported."),
8080
providers.CanUseCAA: providers.Can(),
81-
providers.CanUseDHCID: providers.Cannot(), // per docs
82-
providers.CanUseDNAME: providers.Cannot(), // per docs
83-
providers.CanUseDNSKEY: providers.Cannot(), // per docs
84-
providers.CanUseDS: providers.Cannot(), // per docs
85-
providers.CanUseHTTPS: providers.Cannot(), // per docs
81+
providers.CanUseDHCID: providers.Cannot("Digital Ocean documents that this is not supported."),
82+
providers.CanUseDNAME: providers.Cannot("Digital Ocean documents that this is not supported."),
83+
providers.CanUseDNSKEY: providers.Cannot("Digital Ocean documents that this is not supported."),
84+
providers.CanUseDS: providers.Cannot("Digital Ocean documents that this is not supported."),
85+
providers.CanUseHTTPS: providers.Cannot("Digital Ocean documents that this is not supported."),
8686
providers.CanUseLOC: providers.Cannot(),
87-
providers.CanUseNAPTR: providers.Cannot(), // per docs
88-
providers.CanUsePTR: providers.Cannot(), // per docs
87+
providers.CanUseNAPTR: providers.Cannot("Digital Ocean documents that this is not supported."),
88+
providers.CanUsePTR: providers.Cannot("Digital Ocean documents that this is not supported."),
8989
providers.CanUseSOA: providers.Cannot("Technically SOA is supported but in reality the API only permits updates to the TTL. That is insufficient for DNSControl to claim 'support'"),
9090
providers.CanUseSRV: providers.Can(),
91-
providers.CanUseSSHFP: providers.Cannot(), // per docs
92-
providers.CanUseSMIMEA: providers.Cannot(), // per docs
93-
providers.CanUseSVCB: providers.Cannot(), // per docs
94-
providers.CanUseTLSA: providers.Cannot(), // per docs
91+
providers.CanUseSSHFP: providers.Cannot("Digital Ocean documents that this is not supported."),
92+
providers.CanUseSMIMEA: providers.Cannot("Digital Ocean documents that this is not supported."),
93+
providers.CanUseSVCB: providers.Cannot("Digital Ocean documents that this is not supported."),
94+
providers.CanUseTLSA: providers.Cannot("Digital Ocean documents that this is not supported."),
9595
providers.DocCreateDomains: providers.Can(),
9696
providers.DocDualHost: providers.Can(),
9797
providers.DocOfficiallySupported: providers.Cannot(),

0 commit comments

Comments
 (0)