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,32 @@
package node
import (
"context"
"net/http"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
// UpdateRequest struct to update node for actual version
type UpdateRequest struct {
// List of Node IDs
// Required: true
NID uint64 `url:"nid" json:"nid" validate:"required"`
}
// Update updates node for actual version
func (n Node) Update(ctx context.Context, req UpdateRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/node/update"
res, err := n.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return "", err
}
return string(res), nil
}