github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/metrics/get_metrics_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 metrics 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 // NewGetMetricsParams creates a new GetMetricsParams object 19 // 20 // There are no default values defined in the spec. 21 func NewGetMetricsParams() GetMetricsParams { 22 23 return GetMetricsParams{} 24 } 25 26 // GetMetricsParams contains all the bound params for the get metrics operation 27 // typically these are obtained from a http.Request 28 // 29 // swagger:parameters GetMetrics 30 type GetMetricsParams 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 NewGetMetricsParams() beforehand. 40 func (o *GetMetricsParams) 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 }