This commit is contained in:
2024-04-20 16:45:56 +03:00
commit 937c8d8eab
34 changed files with 3048 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
// 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"
)
// CreateFeedbackHandlerFunc turns a function with the right signature into a create feedback handler
type CreateFeedbackHandlerFunc func(CreateFeedbackParams) middleware.Responder
// Handle executing the request and returning a response
func (fn CreateFeedbackHandlerFunc) Handle(params CreateFeedbackParams) middleware.Responder {
return fn(params)
}
// CreateFeedbackHandler interface for that can handle valid create feedback params
type CreateFeedbackHandler interface {
Handle(CreateFeedbackParams) middleware.Responder
}
// NewCreateFeedback creates a new http.Handler for the create feedback operation
func NewCreateFeedback(ctx *middleware.Context, handler CreateFeedbackHandler) *CreateFeedback {
return &CreateFeedback{Context: ctx, Handler: handler}
}
/*
CreateFeedback swagger:route POST /feedback feedback createFeedback
# Create a feedback
Create a feedback
*/
type CreateFeedback struct {
Context *middleware.Context
Handler CreateFeedbackHandler
}
func (o *CreateFeedback) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewCreateFeedbackParams()
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)
}