github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/examples/generated/restapi/operations/user/logout_user_parameters.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package user 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/go-openapi/runtime/middleware" 13 ) 14 15 // NewLogoutUserParams creates a new LogoutUserParams object 16 // 17 // There are no default values defined in the spec. 18 func NewLogoutUserParams() LogoutUserParams { 19 20 return LogoutUserParams{} 21 } 22 23 // LogoutUserParams contains all the bound params for the logout user operation 24 // typically these are obtained from a http.Request 25 // 26 // swagger:parameters logoutUser 27 type LogoutUserParams 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 NewLogoutUserParams() beforehand. 37 func (o *LogoutUserParams) 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 }