v1.6.7
This commit is contained in:
@@ -36,9 +36,7 @@ func (g Group) Get(ctx context.Context, req GetRequest) (*ItemGroup, error) {
|
||||
func (g Group) GetRaw(ctx context.Context, req GetRequest) ([]byte, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return nil, validators.ValidationError(validationError)
|
||||
}
|
||||
return nil, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudbroker/group/get"
|
||||
|
||||
@@ -4,8 +4,6 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// ListRequest struct to get list of group instances.
|
||||
@@ -27,8 +25,8 @@ type ListRequest struct {
|
||||
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
|
||||
|
||||
// Find by active True or False.
|
||||
// Required: true
|
||||
Active bool `url:"active" json:"active" validate:"required"`
|
||||
// Required: false
|
||||
Active bool `url:"active" json:"active"`
|
||||
}
|
||||
|
||||
// List gets list of group instances as a ListGroups struct
|
||||
@@ -50,13 +48,6 @@ func (g Group) List(ctx context.Context, req ListRequest) (*ListGroups, error) {
|
||||
|
||||
// ListRaw gets list of group instances as an array of bytes
|
||||
func (g Group) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return nil, validators.ValidationError(validationError)
|
||||
}
|
||||
}
|
||||
|
||||
url := "/cloudbroker/group/list"
|
||||
|
||||
res, err := g.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
|
||||
Reference in New Issue
Block a user