feat: new deployment provider: unicloud webhost

This commit is contained in:
Fu Diwei
2025-05-27 04:29:51 +08:00
parent 5339963524
commit cfdd3c621f
22 changed files with 871 additions and 21 deletions

View File

@@ -79,6 +79,7 @@ import (
pTencentCloudWAF "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/tencentcloud-waf"
pUCloudUCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/ucloud-ucdn"
pUCloudUS3 "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/ucloud-us3"
pUniCloudWebHost "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/unicloud-webhost"
pUpyunCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/upyun-cdn"
pVolcEngineALB "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/volcengine-alb"
pVolcEngineCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/volcengine-cdn"
@@ -1144,6 +1145,23 @@ func createDeployerProvider(options *deployerProviderOptions) (deployer.Deployer
}
}
case domain.DeploymentProviderTypeUniCloudWebHost:
{
access := domain.AccessConfigForUniCloud{}
if err := maputil.Populate(options.ProviderAccessConfig, &access); err != nil {
return nil, fmt.Errorf("failed to populate provider access config: %w", err)
}
deployer, err := pUniCloudWebHost.NewDeployer(&pUniCloudWebHost.DeployerConfig{
Username: access.Username,
Password: access.Password,
SpaceProvider: maputil.GetString(options.ProviderServiceConfig, "spaceProvider"),
SpaceId: maputil.GetString(options.ProviderServiceConfig, "spaceId"),
Domain: maputil.GetString(options.ProviderServiceConfig, "domain"),
})
return deployer, err
}
case domain.DeploymentProviderTypeUpyunCDN, domain.DeploymentProviderTypeUpyunFile:
{
access := domain.AccessConfigForUpyun{}