1 // Code generated by go-swagger; DO NOT EDIT.
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the generate command
11 middleware "github.com/go-openapi/runtime/middleware"
14 // SubscribeControlHandlerFunc turns a function with the right signature into a subscribe control handler
15 type SubscribeControlHandlerFunc func(SubscribeControlParams) middleware.Responder
17 // Handle executing the request and returning a response
18 func (fn SubscribeControlHandlerFunc) Handle(params SubscribeControlParams) middleware.Responder {
22 // SubscribeControlHandler interface for that can handle valid subscribe control params
23 type SubscribeControlHandler interface {
24 Handle(SubscribeControlParams) middleware.Responder
27 // NewSubscribeControl creates a new http.Handler for the subscribe control operation
28 func NewSubscribeControl(ctx *middleware.Context, handler SubscribeControlHandler) *SubscribeControl {
29 return &SubscribeControl{Context: ctx, Handler: handler}
32 /*SubscribeControl swagger:route POST /subscriptions/control control subscribeControl
34 Subscribe and send "CONTROL" message to RAN to initiate or resume call processing in RAN
37 type SubscribeControl struct {
38 Context *middleware.Context
39 Handler SubscribeControlHandler
42 func (o *SubscribeControl) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
43 route, rCtx, _ := o.Context.RouteInfo(r)
47 var Params = NewSubscribeControlParams()
49 if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
50 o.Context.Respond(rw, r, route.Produces, route, err)
54 res := o.Handler.Handle(Params) // actually handle the request
56 o.Context.Respond(rw, r, route.Produces, route, res)