v1.4.2
This commit is contained in:
@@ -19,8 +19,9 @@ type PFWAddRequest struct {
|
||||
PublicPortStart uint64 `url:"publicPortStart" json:"publicPortStart" validate:"required"`
|
||||
|
||||
// End port number (inclusive) for the ranged rule
|
||||
// Default value: -1
|
||||
// Required: false
|
||||
PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"`
|
||||
PublicPortEnd int64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"`
|
||||
|
||||
// Internal base port number
|
||||
// Required: true
|
||||
|
||||
@@ -9,14 +9,14 @@ import (
|
||||
)
|
||||
|
||||
// Request struct for disable/enable kubernetes cluster
|
||||
type DisabelEnableRequest struct {
|
||||
type DisableEnableRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId" validate:"required"`
|
||||
}
|
||||
|
||||
// Disable disables kubernetes cluster by ID
|
||||
func (k8s K8S) Disable(ctx context.Context, req DisabelEnableRequest) (bool, error) {
|
||||
func (k8s K8S) Disable(ctx context.Context, req DisableEnableRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
@@ -40,7 +40,7 @@ func (k8s K8S) Disable(ctx context.Context, req DisabelEnableRequest) (bool, err
|
||||
}
|
||||
|
||||
// Enable enables kubernetes cluster by ID
|
||||
func (k8s K8S) Enable(ctx context.Context, req DisabelEnableRequest) (bool, error) {
|
||||
func (k8s K8S) Enable(ctx context.Context, req DisableEnableRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
|
||||
Reference in New Issue
Block a user