refactor: re-impl sdk3rd
This commit is contained in:
@@ -2,7 +2,6 @@ package rainyunrcdn
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"strconv"
|
||||
@@ -92,10 +91,5 @@ func (d *DeployerProvider) Deploy(ctx context.Context, certPEM string, privkeyPE
|
||||
}
|
||||
|
||||
func createSdkClient(apiKey string) (*rainyunsdk.Client, error) {
|
||||
if apiKey == "" {
|
||||
return nil, errors.New("invalid rainyun api key")
|
||||
}
|
||||
|
||||
client := rainyunsdk.NewClient(apiKey)
|
||||
return client, nil
|
||||
return rainyunsdk.NewClient(apiKey)
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ func TestDeploy(t *testing.T) {
|
||||
}, "\n"))
|
||||
|
||||
deployer, err := provider.NewDeployer(&provider.DeployerConfig{
|
||||
PrivateKey: fApiKey,
|
||||
InstanceId: fInstanceId,
|
||||
ApiKey: fApiKey,
|
||||
InstanceId: int32(fInstanceId),
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user