From 300f42d084496e3f2cb4fdfc63be17742ab0e75f Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 28 Nov 2022 17:15:56 +0100 Subject: [PATCH] arvancloud: replace arvancloud.com by arvancloud.ir (#1771) --- docs/content/dns/zz_gen_arvancloud.md | 6 +++--- providers/dns/arvancloud/arvancloud.toml | 4 ++-- providers/dns/arvancloud/internal/client.go | 8 ++++---- .../dns/arvancloud/internal/fixtures/get_txt_record.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/content/dns/zz_gen_arvancloud.md b/docs/content/dns/zz_gen_arvancloud.md index 531a95ba..f39f8c51 100644 --- a/docs/content/dns/zz_gen_arvancloud.md +++ b/docs/content/dns/zz_gen_arvancloud.md @@ -6,7 +6,7 @@ slug: arvancloud dnsprovider: since: "v3.8.0" code: "arvancloud" - url: "https://arvancloud.com" + url: "https://arvancloud.ir" --- @@ -14,7 +14,7 @@ dnsprovider: -Configuration for [ArvanCloud](https://arvancloud.com). +Configuration for [ArvanCloud](https://arvancloud.ir). @@ -60,7 +60,7 @@ More information [here]({{< ref "dns#configuration-and-credentials" >}}). ## More information -- [API documentation](https://www.arvancloud.com/docs/api/cdn/4.0) +- [API documentation](https://www.arvancloud.ir/docs/api/cdn/4.0) diff --git a/providers/dns/arvancloud/arvancloud.toml b/providers/dns/arvancloud/arvancloud.toml index fc4148b5..f53eb729 100644 --- a/providers/dns/arvancloud/arvancloud.toml +++ b/providers/dns/arvancloud/arvancloud.toml @@ -1,6 +1,6 @@ Name = "ArvanCloud" Description = '''''' -URL = "https://arvancloud.com" +URL = "https://arvancloud.ir" Code = "arvancloud" Since = "v3.8.0" @@ -19,4 +19,4 @@ lego --email you@example.com --dns arvancloud --domains my.example.org run ARVANCLOUD_HTTP_TIMEOUT = "API request timeout" [Links] - API = "https://www.arvancloud.com/docs/api/cdn/4.0" + API = "https://www.arvancloud.ir/docs/api/cdn/4.0" diff --git a/providers/dns/arvancloud/internal/client.go b/providers/dns/arvancloud/internal/client.go index abc2f73f..cbfdf164 100644 --- a/providers/dns/arvancloud/internal/client.go +++ b/providers/dns/arvancloud/internal/client.go @@ -12,7 +12,7 @@ import ( ) // defaultBaseURL represents the API endpoint to call. -const defaultBaseURL = "https://napi.arvancloud.com" +const defaultBaseURL = "https://napi.arvancloud.ir" const authHeader = "Authorization" @@ -49,7 +49,7 @@ func (c *Client) GetTxtRecord(domain, name, value string) (*DNSRecord, error) { return nil, fmt.Errorf("could not find record: Domain: %s; Record: %s", domain, name) } -// https://www.arvancloud.com/docs/api/cdn/4.0#operation/dns_records.list +// https://www.arvancloud.ir/docs/api/cdn/4.0#operation/dns_records.list func (c *Client) getRecords(domain, search string) ([]DNSRecord, error) { endpoint, err := c.createEndpoint("cdn", "4.0", "domains", domain, "dns-records") if err != nil { @@ -95,7 +95,7 @@ func (c *Client) getRecords(domain, search string) ([]DNSRecord, error) { } // CreateRecord creates a DNS record. -// https://www.arvancloud.com/docs/api/cdn/4.0#operation/dns_records.create +// https://www.arvancloud.ir/docs/api/cdn/4.0#operation/dns_records.create func (c *Client) CreateRecord(domain string, record DNSRecord) (*DNSRecord, error) { reqBody, err := json.Marshal(record) if err != nil { @@ -137,7 +137,7 @@ func (c *Client) CreateRecord(domain string, record DNSRecord) (*DNSRecord, erro } // DeleteRecord deletes a DNS record. -// https://www.arvancloud.com/docs/api/cdn/4.0#operation/dns_records.remove +// https://www.arvancloud.ir/docs/api/cdn/4.0#operation/dns_records.remove func (c *Client) DeleteRecord(domain, id string) error { endpoint, err := c.createEndpoint("cdn", "4.0", "domains", domain, "dns-records", id) if err != nil { diff --git a/providers/dns/arvancloud/internal/fixtures/get_txt_record.json b/providers/dns/arvancloud/internal/fixtures/get_txt_record.json index 34cae01b..188c4665 100644 --- a/providers/dns/arvancloud/internal/fixtures/get_txt_record.json +++ b/providers/dns/arvancloud/internal/fixtures/get_txt_record.json @@ -227,8 +227,8 @@ } ], "links": { - "first": "https://napi.arvancloud.com/4.0/domains/example.ir/dns-records?page=1", - "last": "https://napi.arvancloud.com/4.0/domains/example.ir/dns-records?page=1", + "first": "https://napi.arvancloud.ir/4.0/domains/example.ir/dns-records?page=1", + "last": "https://napi.arvancloud.ir/4.0/domains/example.ir/dns-records?page=1", "prev": null, "next": null }, @@ -236,7 +236,7 @@ "current_page": 1, "from": 1, "last_page": 1, - "path": "https://napi.arvancloud.com/4.0/domains/example.ir/dns-records", + "path": "https://napi.arvancloud.ir/4.0/domains/example.ir/dns-records", "per_page": 300, "to": 8, "total": 8