feat: add cachefly deployer

This commit is contained in:
Fu Diwei
2025-02-18 11:45:41 +08:00
parent 7c3f2399c2
commit 46f02331fd
52 changed files with 433 additions and 192 deletions

View File

@@ -22,6 +22,7 @@ import (
pBaotaPanelConsole "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/baotapanel-console"
pBaotaPanelSite "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/baotapanel-site"
pBytePlusCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/byteplus-cdn"
pCacheFly "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/cachefly"
pDogeCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/dogecloud-cdn"
pEdgioApplications "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/edgio-applications"
pGcoreCDN "github.com/usual2970/certimate/internal/pkg/core/deployer/providers/gcore-cdn"
@@ -288,6 +289,19 @@ func createDeployer(options *deployerOptions) (deployer.Deployer, logger.Logger,
}
}
case domain.DeployProviderTypeCacheFly:
{
access := domain.AccessConfigForCacheFly{}
if err := maps.Populate(options.ProviderAccessConfig, &access); err != nil {
return nil, nil, fmt.Errorf("failed to populate provider access config: %w", err)
}
deployer, err := pCacheFly.NewWithLogger(&pCacheFly.CacheFlyDeployerConfig{
ApiToken: access.ApiToken,
}, logger)
return deployer, logger, err
}
case domain.DeployProviderTypeDogeCloudCDN:
{
access := domain.AccessConfigForDogeCloud{}