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