Skip to content

Commit bfc2b26

Browse files
authored
CHORE: generate-all.sh (#3827)
1 parent 25dd06a commit bfc2b26

File tree

2 files changed

+47
-35
lines changed

2 files changed

+47
-35
lines changed

commands/types/dnscontrol.d.ts

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -833,10 +833,9 @@ declare function DHCID(name: string, digest: string, ...modifiers: RecordModifie
833833
declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier;
834834

835835
/**
836-
* DNSControl contains a `DKIM_BUILDER` which can be used to simply create
837-
* DKIM policies for your domains.
836+
* DNSControl contains a `DKIM_BUILDER` helper function that generates DKIM DNS TXT records according to RFC 6376 (DomainKeys Identified Mail) and its updates.
838837
*
839-
* ## Example
838+
* ## Examples
840839
*
841840
* ### Simple example
842841
*
@@ -860,13 +859,15 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier;
860859
* ```javascript
861860
* D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER),
862861
* DKIM_BUILDER({
863-
* label: "alerts",
864862
* selector: "k2",
865863
* pubkey: "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L",
866-
* flags: ['y'],
867-
* hashtypes: ['sha256'],
868-
* keytype: 'rsa',
864+
* label: "subdomain",
865+
* version: "DKIM1",
866+
* hashtypes: ['sha1', 'sha256'],
867+
* keytype: "rsa",
868+
* note: "some human-readable notes",
869869
* servicetypes: ['email'],
870+
* flags: ['y', 's'],
870871
* ttl: 150
871872
* }),
872873
* );
@@ -875,30 +876,42 @@ declare const DISABLE_IGNORE_SAFETY_CHECK: DomainModifier;
875876
* This yields the following record:
876877
*
877878
* ```text
878-
*
879-
* k2._domainkey.alerts IN TXT "v=DKIM1; k=rsa; s=email; t=y; h=sha256; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L" ttl=150
880-
*
879+
* k2._domainkey.subdomain IN TXT "v=DKIM1; h=sha1:sha256; k=rsa; n=some=20human-readable=20notes; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDC5/z4L; s=email; t=y:s" ttl=150
881880
* ```
882881
*
883-
* ### Parameters
884-
*
885-
* * `label:` The DNS label for the DKIM record (`[selector]._domainkey` prefix is added; default: `'@'`)
886-
* * `selector:` Selector used for the label. e.g. `s1` or `mail`
887-
* * `pubkey:` Public key `p` to be used for DKIM.
888-
* * `keytype:` Key type `k`. Defaults to `'rsa'` if omitted (optional)
889-
* * `flags:` Which types `t` of flags to activate, ie. 'y' and/or 's'. Array, defaults to 's' (optional)
890-
* * `hashtypes:` Acceptable hash algorithms `h` (optional)
891-
* * `servicetypes:` Record-applicable service types (optional)
892-
* * `note:` Note field `n` for admins. Avoid if possible to keep record length short. (optional)
893-
* * `ttl:` Input for `TTL` method (optional)
894-
*
895-
* ### Caveats
882+
* ## Parameters
896883
*
897-
* * DKIM (TXT) records are automatically split using `AUTOSPLIT`.
884+
* * `selector` (string, required): The selector subdividing the namespace for the domain.
885+
* * `pubkey` (string, optional): The base64-encoded public key (RSA or Ed25519). Default: empty (key revocation or non-sending domain).
886+
* * `label` (string, optional): The DNS label for the DKIM record. Default: `@`.
887+
* * `version` (string, optional): DKIM version. Maps to the `v=` tag. Default: `DKIM1` (currently the only supported value).
888+
* * `hashtypes` (array, optional): Acceptable hash algorithms for signing. Maps to the `h=` tag.
889+
* * Supported values for RSA key:
890+
* * `sha1`
891+
* * `sha256`
892+
* * Supported values for Ed25519 key:
893+
* * `sha256`
894+
* * `keytype` (string, optional): Key algorithm type. Maps to the `k=` tag. Default: `rsa`. Supported values:
895+
* * `rsa`
896+
* * `ed25519`
897+
* * `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.
898+
* * `servicetypes` (array, optional): Service types using this key. Maps to the `s=` tag. Supported values:
899+
* * `*`: explicity allows all service types
900+
* * `email`: restricts key to email service only
901+
* * `flags` (array, optional): Flags to modify the interpretation of the selector. Maps to the `t=` tag. Supported values:
902+
* * `y`: Testing mode.
903+
* * `s`: Subdomain restriction.
904+
* * `ttl` (number, optional): DNS TTL value in seconds
905+
*
906+
* ## Related RFCs
907+
*
908+
* * RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
909+
* * RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM
910+
* * RFC 8463: A New Cryptographic Signature Method for DKIM (Ed25519)
898911
*
899912
* @see https://docs.dnscontrol.org/language-reference/domain-modifiers/dkim_builder
900913
*/
901-
declare function DKIM_BUILDER(opts: { label?: string; selector: string; pubkey: string; flags?: string[]; hashtypes?: string[]; keytype?: string; servicetypes?: string[]; note?: string; ttl?: Duration }): DomainModifier;
914+
declare function DKIM_BUILDER(opts: { selector: string; pubkey?: string; label?: string; version?: string; hashtypes?: string|string[]; keytype?: string; note?: string; servicetypes?: string|string[]; flags?: string|string[]; ttl?: Duration }): DomainModifier;
902915

903916
/**
904917
* DNSControl contains a `DMARC_BUILDER` which can be used to simply create
@@ -2032,13 +2045,13 @@ declare function LOC_BUILDER_STR(opts: { label?: string; str: string; alt?: numb
20322045
* ### Multi-statement (leading `;`)
20332046
*
20342047
* ```javascript
2035-
* LUA("api", "A", `
2036-
* ; if continent('EU') then
2037-
* return {'198.51.100.1'}
2038-
* else
2039-
* return {'192.0.2.10','192.0.2.20'}
2040-
* end
2041-
* `, TTL(60));
2048+
* LUA("api", "A", [
2049+
* "; if continent('EU') then ",
2050+
* " return {'198.51.100.1'} ",
2051+
* " else ",
2052+
* " return {'192.0.2.10','192.0.2.20'} ",
2053+
* " end"
2054+
* ], TTL(60));
20422055
*
20432056
* // Dynamic TXT, showing the queried name (string building example)
20442057
* LUA("_diag", "TXT", "; return 'Got a TXT query for ' .. qname:toString()", TTL(30));
@@ -2067,7 +2080,7 @@ declare function LOC_BUILDER_STR(opts: { label?: string; str: string; alt?: numb
20672080
* - DNSControl **PowerDNS provider** page.
20682081
* - DNSControl **Supported providers** table.
20692082
*
2070-
* @see https://docs.dnscontrol.org/language-reference/domain-modifiers/lua
2083+
* @see https://docs.dnscontrol.org/language-reference/domain-modifiers/service-provider-specific//lua
20712084
*/
20722085
declare function LUA(name: string, rtype: string, contents: string | string[], ...modifiers: RecordModifier[]): DomainModifier;
20732086

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ require (
5959
require (
6060
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1
6161
github.com/G-Core/gcore-dns-sdk-go v0.3.3
62-
github.com/aws/aws-sdk-go-v2/service/sts v1.38.6
62+
github.com/aws/aws-sdk-go-v2/service/sts v1.39.0
6363
github.com/centralnicgroup-opensource/rtldev-middleware-go-sdk/v5 v5.0.18
6464
github.com/containrrr/shoutrrr v0.8.0
6565
github.com/failsafe-go/failsafe-go v0.9.1
@@ -96,7 +96,6 @@ require (
9696
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.12 // indirect
9797
github.com/aws/aws-sdk-go-v2/service/sso v1.30.0 // indirect
9898
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.4 // indirect
99-
github.com/aws/aws-sdk-go-v2/service/sts v1.39.0 // indirect
10099
github.com/aws/smithy-go v1.23.1 // indirect
101100
github.com/bits-and-blooms/bitset v1.24.0 // indirect
102101
github.com/boombuler/barcode v1.0.1 // indirect

0 commit comments

Comments
 (0)