99 "time"
1010
1111 openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
12- esa "github.com/alibabacloud-go/esa-20240910/v2/client"
1312 "github.com/alibabacloud-go/tea/dara"
1413 "github.com/aliyun/credentials-go/credentials"
14+ esa "github.com/go-acme/esa-20240910/v2/client"
1515 "github.com/go-acme/lego/v4/challenge/dns01"
1616 "github.com/go-acme/lego/v4/platform/config/env"
1717 "github.com/go-acme/lego/v4/providers/dns/internal/ptr"
@@ -161,7 +161,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
161161 SetData (new (esa.CreateRecordRequestData ).SetValue (info .Value ))
162162
163163 // https://www.alibabacloud.com/help/en/edge-security-acceleration/esa/api-esa-2024-09-10-createrecord
164- crResp , err := d . client . CreateRecordWithContext (ctx , crReq , & dara.RuntimeOptions {})
164+ crResp , err := esa . CreateRecordWithContext (ctx , d . client , crReq , & dara.RuntimeOptions {})
165165 if err != nil {
166166 return fmt .Errorf ("aliesa: create record: %w" , err )
167167 }
@@ -192,7 +192,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
192192 SetRecordId (recordID )
193193
194194 // https://www.alibabacloud.com/help/en/edge-security-acceleration/esa/api-esa-2024-09-10-deleterecord
195- _ , err := d . client . DeleteRecordWithContext (ctx , drReq , & dara.RuntimeOptions {})
195+ _ , err := esa . DeleteRecordWithContext (ctx , d . client , drReq , & dara.RuntimeOptions {})
196196 if err != nil {
197197 return fmt .Errorf ("aliesa: delete record: %w" , err )
198198 }
@@ -217,7 +217,7 @@ func (d *DNSProvider) getSiteID(ctx context.Context, fqdn string) (int64, error)
217217 SetSiteSearchType ("suffix" )
218218
219219 // https://www.alibabacloud.com/help/en/edge-security-acceleration/esa/api-esa-2024-09-10-listsites
220- lsResp , err := d . client . ListSitesWithContext (ctx , lsReq , & dara.RuntimeOptions {})
220+ lsResp , err := esa . ListSitesWithContext (ctx , d . client , lsReq , & dara.RuntimeOptions {})
221221 if err != nil {
222222 return 0 , fmt .Errorf ("list sites: %w" , err )
223223 }
0 commit comments