github.com/cilium/cilium@v1.16.2/api/v1/kvstoremesh/server/restapi/cluster/get_cluster_parameters.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  // Copyright Authors of Cilium
     4  // SPDX-License-Identifier: Apache-2.0
     5  
     6  package cluster
     7  
     8  // This file was generated by the swagger tool.
     9  // Editing this file might prove futile when you re-run the swagger generate command
    10  
    11  import (
    12  	"net/http"
    13  
    14  	"github.com/go-openapi/errors"
    15  	"github.com/go-openapi/runtime/middleware"
    16  )
    17  
    18  // NewGetClusterParams creates a new GetClusterParams object
    19  //
    20  // There are no default values defined in the spec.
    21  func NewGetClusterParams() GetClusterParams {
    22  
    23  	return GetClusterParams{}
    24  }
    25  
    26  // GetClusterParams contains all the bound params for the get cluster operation
    27  // typically these are obtained from a http.Request
    28  //
    29  // swagger:parameters GetCluster
    30  type GetClusterParams struct {
    31  
    32  	// HTTP Request Object
    33  	HTTPRequest *http.Request `json:"-"`
    34  }
    35  
    36  // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
    37  // for simple values it will use straight method calls.
    38  //
    39  // To ensure default values, the struct must have been initialized with NewGetClusterParams() beforehand.
    40  func (o *GetClusterParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
    41  	var res []error
    42  
    43  	o.HTTPRequest = r
    44  
    45  	if len(res) > 0 {
    46  		return errors.CompositeValidationError(res...)
    47  	}
    48  	return nil
    49  }