github.com/djarvur/go-swagger@v0.18.0/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 // no default values defined in spec. 17 func NewLogoutUserParams() LogoutUserParams { 18 19 return LogoutUserParams{} 20 } 21 22 // LogoutUserParams contains all the bound params for the logout user operation 23 // typically these are obtained from a http.Request 24 // 25 // swagger:parameters logoutUser 26 type LogoutUserParams struct { 27 28 // HTTP Request Object 29 HTTPRequest *http.Request `json:"-"` 30 } 31 32 // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface 33 // for simple values it will use straight method calls. 34 // 35 // To ensure default values, the struct must have been initialized with NewLogoutUserParams() beforehand. 36 func (o *LogoutUserParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { 37 var res []error 38 39 o.HTTPRequest = r 40 41 if len(res) > 0 { 42 return errors.CompositeValidationError(res...) 43 } 44 return nil 45 }