This repository has been archived on 2024-09-11. You can view files and clone it, but cannot push or open issues or pull requests.
frostfs-rest-gw/gen/restapi/operations/options_containers_e_acl.go

57 lines
1.9 KiB
Go
Raw Normal View History

// Code generated by go-swagger; DO NOT EDIT.
package operations
// 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"
)
// OptionsContainersEACLHandlerFunc turns a function with the right signature into a options containers e ACL handler
type OptionsContainersEACLHandlerFunc func(OptionsContainersEACLParams) middleware.Responder
// Handle executing the request and returning a response
func (fn OptionsContainersEACLHandlerFunc) Handle(params OptionsContainersEACLParams) middleware.Responder {
return fn(params)
}
// OptionsContainersEACLHandler interface for that can handle valid options containers e ACL params
type OptionsContainersEACLHandler interface {
Handle(OptionsContainersEACLParams) middleware.Responder
}
// NewOptionsContainersEACL creates a new http.Handler for the options containers e ACL operation
func NewOptionsContainersEACL(ctx *middleware.Context, handler OptionsContainersEACLHandler) *OptionsContainersEACL {
return &OptionsContainersEACL{Context: ctx, Handler: handler}
}
/*
OptionsContainersEACL swagger:route OPTIONS /containers/{containerId}/eacl optionsContainersEAcl
OptionsContainersEACL options containers e ACL API
*/
type OptionsContainersEACL struct {
Context *middleware.Context
Handler OptionsContainersEACLHandler
}
func (o *OptionsContainersEACL) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewOptionsContainersEACLParams()
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)
}