This commit is contained in:
Fu Diwei 2025-07-01 11:35:41 +08:00 committed by RHQYZ
parent 9e4b7691ce
commit 37e0188db7
2 changed files with 2 additions and 7 deletions

View File

@ -5,7 +5,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"log/slog" "log/slog"
"strings"
aliopen "github.com/alibabacloud-go/darabonba-openapi/v2/client" aliopen "github.com/alibabacloud-go/darabonba-openapi/v2/client"
alislb "github.com/alibabacloud-go/slb-20140515/v4/client" alislb "github.com/alibabacloud-go/slb-20140515/v4/client"
@ -13,7 +12,6 @@ import (
"github.com/certimate-go/certimate/pkg/core" "github.com/certimate-go/certimate/pkg/core"
sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-slb" sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-slb"
"github.com/certimate-go/certimate/pkg/utils/ifelse"
) )
type SSLDeployerProviderConfig struct { type SSLDeployerProviderConfig struct {
@ -61,10 +59,7 @@ func NewSSLDeployerProvider(config *SSLDeployerProviderConfig) (*SSLDeployerProv
AccessKeyId: config.AccessKeyId, AccessKeyId: config.AccessKeyId,
AccessKeySecret: config.AccessKeySecret, AccessKeySecret: config.AccessKeySecret,
ResourceGroupId: config.ResourceGroupId, ResourceGroupId: config.ResourceGroupId,
Region: ifelse. Region: config.Region,
If[string](config.Region == "" || strings.HasPrefix(config.Region, "cn-")).
Then("cn-hangzhou").
Else("ap-southeast-1"),
}) })
if err != nil { if err != nil {
return nil, fmt.Errorf("could not create ssl manager: %w", err) return nil, fmt.Errorf("could not create ssl manager: %w", err)

View File

@ -13,7 +13,7 @@ import (
"github.com/alibabacloud-go/tea/tea" "github.com/alibabacloud-go/tea/tea"
"github.com/certimate-go/certimate/pkg/core" "github.com/certimate-go/certimate/pkg/core"
sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-slb" sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-cas"
"github.com/certimate-go/certimate/pkg/utils/ifelse" "github.com/certimate-go/certimate/pkg/utils/ifelse"
) )