feat: add baishan cdn deployer

This commit is contained in:
Fu Diwei
2025-02-17 20:19:31 +08:00
parent c72dc0d2c4
commit b2eb5d2754
34 changed files with 866 additions and 285 deletions

View File

@@ -16,14 +16,14 @@ type BaotaPanelSiteDeployerConfig struct {
ApiUrl string `json:"apiUrl"`
// 宝塔面板接口密钥。
ApiKey string `json:"apiKey"`
// 站点名称
// 站点名称
SiteName string `json:"siteName"`
}
type BaotaPanelSiteDeployer struct {
config *BaotaPanelSiteDeployerConfig
logger logger.Logger
sdkClient *btsdk.BaoTaPanelClient
sdkClient *btsdk.Client
}
var _ deployer.Deployer = (*BaotaPanelSiteDeployer)(nil)
@@ -75,7 +75,7 @@ func (d *BaotaPanelSiteDeployer) Deploy(ctx context.Context, certPem string, pri
return &deployer.DeployResult{}, nil
}
func createSdkClient(apiUrl, apiKey string) (*btsdk.BaoTaPanelClient, error) {
client := btsdk.NewBaoTaPanelClient(apiUrl, apiKey)
func createSdkClient(apiUrl, apiKey string) (*btsdk.Client, error) {
client := btsdk.NewClient(apiUrl, apiKey)
return client, nil
}