// Code generated by go-swagger; DO NOT EDIT. package feedback // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command import ( "net/http" "github.com/go-openapi/runtime/middleware" ) // UpvoteFeedbackHandlerFunc turns a function with the right signature into a upvote feedback handler type UpvoteFeedbackHandlerFunc func(UpvoteFeedbackParams) middleware.Responder // Handle executing the request and returning a response func (fn UpvoteFeedbackHandlerFunc) Handle(params UpvoteFeedbackParams) middleware.Responder { return fn(params) } // UpvoteFeedbackHandler interface for that can handle valid upvote feedback params type UpvoteFeedbackHandler interface { Handle(UpvoteFeedbackParams) middleware.Responder } // NewUpvoteFeedback creates a new http.Handler for the upvote feedback operation func NewUpvoteFeedback(ctx *middleware.Context, handler UpvoteFeedbackHandler) *UpvoteFeedback { return &UpvoteFeedback{Context: ctx, Handler: handler} } /* UpvoteFeedback swagger:route POST /feedback/{feedback_uuid}/vote feedback upvoteFeedback # Upvote a feedback Upvote a feedback */ type UpvoteFeedback struct { Context *middleware.Context Handler UpvoteFeedbackHandler } func (o *UpvoteFeedback) ServeHTTP(rw http.ResponseWriter, r *http.Request) { route, rCtx, _ := o.Context.RouteInfo(r) if rCtx != nil { *r = *rCtx } var Params = NewUpvoteFeedbackParams() if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params o.Context.Respond(rw, r, route.Produces, route, err) return } res := o.Handler.Handle(Params) // actually handle the request o.Context.Respond(rw, r, route.Produces, route, res) }