github.com/Bio-core/jtree@v0.0.0-20190705165106-1d7a7e7d6272/restapi/operations/logout_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/go-openapi/runtime/middleware"
    13  )
    14  
    15  // NewLogoutParams creates a new LogoutParams object
    16  // with the default values initialized.
    17  func NewLogoutParams() LogoutParams {
    18  	var ()
    19  	return LogoutParams{}
    20  }
    21  
    22  // LogoutParams contains all the bound params for the logout operation
    23  // typically these are obtained from a http.Request
    24  //
    25  // swagger:parameters logout
    26  type LogoutParams 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  func (o *LogoutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
    35  	var res []error
    36  	o.HTTPRequest = r
    37  
    38  	if len(res) > 0 {
    39  		return errors.CompositeValidationError(res...)
    40  	}
    41  	return nil
    42  }