diff --git a/commands/types/dnscontrol.d.ts b/commands/types/dnscontrol.d.ts index 220c4547c..d77231fe9 100644 --- a/commands/types/dnscontrol.d.ts +++ b/commands/types/dnscontrol.d.ts @@ -1131,7 +1131,13 @@ declare function DefaultTTL(ttl: Duration): DomainModifier; declare function DnsProvider(name: string, nsCount?: number): DomainModifier; /** - * Documentation needed. + * This is provider specific type of record and not a DNS standard. It may behave differently for each provider that handles it. + * + * ### Namecheap + * + * This is a URL Redirect record with a type of "Masked", it creates a framed HTML page to the target. + * + * You can read more at the [Namecheap documentation](https://www.namecheap.com/support/knowledgebase/article.aspx/385/2237/how-to-set-up-a-url-redirect-for-a-domain/). * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/frame */ @@ -3256,18 +3262,30 @@ declare function TTL(ttl: Duration): RecordModifier; declare function TXT(name: string, contents: string, ...modifiers: RecordModifier[]): DomainModifier; /** - * Documentation needed. + * This is provider specific type of record and not a DNS standard. It may behave differently for each provider that handles it. + * + * ### Namecheap + * + * This is a URL Redirect record with a type of "Unmasked", it creates a 302 redirect to the target. + * + * You can read more at the [Namecheap documentation](https://www.namecheap.com/support/knowledgebase/article.aspx/385/2237/how-to-set-up-a-url-redirect-for-a-domain/) * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/url */ declare function URL(name: string, target: string, ...modifiers: RecordModifier[]): DomainModifier; /** - * Documentation needed. + * This is provider specific type of record and not a DNS standard. It may behave differently for each provider that handles it. + * + * ### Namecheap + * + * This is a URL Redirect record with a type of "Permanent", it creates a 301 redirect to the target. + * + * You can read more at the [Namecheap documentation](https://www.namecheap.com/support/knowledgebase/article.aspx/385/2237/how-to-set-up-a-url-redirect-for-a-domain/). * * @see https://docs.dnscontrol.org/language-reference/domain-modifiers/url301 */ -declare function URL301(name: string, ...modifiers: RecordModifier[]): DomainModifier; +declare function URL301(name: string, target: string, ...modifiers: RecordModifier[]): DomainModifier; /** * `getConfiguredDomains` getConfiguredDomains is a helper function that returns the domain names diff --git a/documentation/provider/index.md b/documentation/provider/index.md index f75f5a6bb..bc68cced5 100644 --- a/documentation/provider/index.md +++ b/documentation/provider/index.md @@ -36,7 +36,7 @@ If a feature is definitively not supported for whatever reason, we would also li | [`EXOSCALE`](exoscale.md) | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ❔ | ❔ | ❌ | ❔ | ✅ | ❔ | ✅ | ❔ | ❔ | ❌ | ❔ | ❔ | ❔ | ❔ | ❌ | ❌ | ❔ | | [`GANDI_V5`](gandi_v5.md) | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❔ | ❔ | ❌ | ❔ | ✅ | ❔ | ✅ | ✅ | ❔ | ✅ | ❌ | ❔ | ❔ | ❔ | ❔ | ❌ | ✅ | | [`GCLOUD`](gcloud.md) | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❔ | ✅ | ❌ | ❔ | ✅ | ❔ | ✅ | ✅ | ✅ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | -| [`GCORE`](gcore.md) | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ✅ | ❌ | ✅ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | +| [`GCORE`](gcore.md) | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❔ | ✅ | ❌ | ✅ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`HEDNS`](hedns.md) | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`HETZNER`](hetzner.md) | ❌ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❔ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❔ | ✅ | ✅ | ❔ | ❔ | ❔ | ✅ | ✅ | ✅ | | [`HEXONET`](hexonet.md) | ❌ | ✅ | ✅ | ❔ | ❌ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ❔ | ✅ | ❔ | ❔ | ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ✅ | ❔ | diff --git a/providers/gcore/gcoreProvider.go b/providers/gcore/gcoreProvider.go index cca232a61..d45539b73 100644 --- a/providers/gcore/gcoreProvider.go +++ b/providers/gcore/gcoreProvider.go @@ -46,7 +46,7 @@ var features = providers.DocumentationNotes{ // See providers/capabilities.go for the entire list of capabilities. providers.CanAutoDNSSEC: providers.Can(), providers.CanGetZones: providers.Can(), - providers.CanConcur: providers.Unimplemented(), + providers.CanConcur: providers.Can(), providers.CanUseAlias: providers.Can(), providers.CanUseCAA: providers.Can(), providers.CanUseDS: providers.Cannot(), @@ -227,6 +227,21 @@ func (c *gcoreProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, exist return result, actualChangeCount, nil } +// ListZones return all the zones in the account +func (c *gcoreProvider) ListZones() ([]string, error) { + zones, err := c.provider.Zones(c.ctx) + if err != nil { + return nil, err + } + + var zoneList []string + for _, zone := range zones { + zoneList = append(zoneList, zone.Name) + } + + return zoneList, nil +} + func comparableFunc(rec *models.RecordConfig) string { if len(rec.Metadata) == 0 { return ""