This commit is contained in:
2026-06-19 17:37:20 +03:00
parent b897b3447a
commit f679261f74
1513 changed files with 107093 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
package sep
import (
"context"
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
// GetPoolRequest struct to get SEP pool config by name
type GetPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"`
// Pool name
// Required: true
PoolName string `url:"pool_name" json:"pool_name" validate:"required"`
}
// GetPool gets SEP pool config by name
func (s SEP) GetPool(ctx context.Context, req GetPoolRequest) (*RecordPool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return nil, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/sep/getPool"
res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return nil, err
}
info := RecordPool{}
err = json.Unmarshal(res, &info)
if err != nil {
return nil, err
}
return &info, nil
}