This commit is contained in:
2023-04-28 11:46:58 +03:00
parent 7d6cda7119
commit aaf0857ff0
38 changed files with 744 additions and 86 deletions

View File

@@ -158,6 +158,12 @@ type RecordAccount struct {
// Computes
Computes Computes `json:"computes"`
// CPU allocation parameter
CPUAllocationParameter string `json:"cpu_allocation_parameter"`
// CPU allocation ratio
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
// Created by
CreatedBy string `json:"createdBy"`
@@ -192,7 +198,7 @@ type RecordAccount struct {
ResourceLimits ResourceLimits `json:"resourceLimits"`
// Resource types
ResourceTypes []string `json:"resourceTypes"`
ResTypes []string `json:"resourceTypes"`
// Send access emails
SendAccessEmails bool `json:"sendAccessEmails"`

View File

@@ -3,8 +3,6 @@ package account
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
@@ -26,15 +24,10 @@ func (a Account) Restore(ctx context.Context, req RestoreRequest) (bool, error)
url := "/cloudapi/account/restore"
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
_, err = a.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return false, err
}
result, err := strconv.ParseBool(string(res))
if err != nil {
return false, err
}
return result, nil
return true, nil
}