v1.6.7
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for add compute instance
|
||||
// ComputeAddRequest struct to add compute instance
|
||||
type ComputeAddRequest struct {
|
||||
// ID of the Floating IP group to add compute instance to
|
||||
// Required: true
|
||||
@@ -23,9 +23,7 @@ type ComputeAddRequest struct {
|
||||
func (f FLIPGroup) ComputeAdd(ctx context.Context, req ComputeAddRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return false, validators.ValidationError(validationError)
|
||||
}
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudapi/flipgroup/computeAdd"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for remove compute instance
|
||||
// ComputeRemoveRequest struct to remove compute instance
|
||||
type ComputeRemoveRequest struct {
|
||||
// ID of the Floating IP group to remove compute instance from
|
||||
// Required: true
|
||||
@@ -23,9 +23,7 @@ type ComputeRemoveRequest struct {
|
||||
func (f FLIPGroup) ComputeRemove(ctx context.Context, req ComputeRemoveRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return false, validators.ValidationError(validationError)
|
||||
}
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudapi/flipgroup/computeRemove"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for create FLIPGroup
|
||||
// CreateRequest struct to create FLIPGroup
|
||||
type CreateRequest struct {
|
||||
// Account ID
|
||||
// Required: true
|
||||
@@ -48,9 +48,7 @@ type CreateRequest struct {
|
||||
func (f FLIPGroup) Create(ctx context.Context, req CreateRequest) (*RecordFLIPGroupCreated, 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 := "/cloudapi/flipgroup/create"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for delete FLIPGroup
|
||||
// DeleteRequest struct to delete FLIPGroup
|
||||
type DeleteRequest struct {
|
||||
// FLIPGroup ID
|
||||
// Required: true
|
||||
@@ -19,9 +19,7 @@ type DeleteRequest struct {
|
||||
func (f FLIPGroup) Delete(ctx context.Context, req DeleteRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return false, validators.ValidationError(validationError)
|
||||
}
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudapi/flipgroup/delete"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for edit FLIPGroup
|
||||
// EditRequest struct to edit FLIPGroup
|
||||
type EditRequest struct {
|
||||
// FLIPGroup ID
|
||||
// Required: true
|
||||
@@ -27,9 +27,7 @@ type EditRequest struct {
|
||||
func (f FLIPGroup) Edit(ctx context.Context, req EditRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return false, validators.ValidationError(validationError)
|
||||
}
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudapi/flipgroup/edit"
|
||||
|
||||
@@ -36,9 +36,7 @@ func (f FLIPGroup) Get(ctx context.Context, req GetRequest) (*RecordFLIPGroup, e
|
||||
func (f FLIPGroup) 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 := "/cloudapi/flipgroup/get"
|
||||
|
||||
Reference in New Issue
Block a user