X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=pkg%2Frestapi%2Foperations%2Freport%2Fsubscribe_report.go;fp=pkg%2Frestapi%2Foperations%2Freport%2Fsubscribe_report.go;h=0000000000000000000000000000000000000000;hb=3602bf801fef17e317cb35a4c710118ec80908b9;hp=d0ea85ec93f75528092bf49ea80d8a71fcc540a7;hpb=060448c051013852d463bc13bfc5f0aa3696ac9c;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/restapi/operations/report/subscribe_report.go b/pkg/restapi/operations/report/subscribe_report.go deleted file mode 100644 index d0ea85e..0000000 --- a/pkg/restapi/operations/report/subscribe_report.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package report - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - middleware "github.com/go-openapi/runtime/middleware" -) - -// SubscribeReportHandlerFunc turns a function with the right signature into a subscribe report handler -type SubscribeReportHandlerFunc func(SubscribeReportParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn SubscribeReportHandlerFunc) Handle(params SubscribeReportParams) middleware.Responder { - return fn(params) -} - -// SubscribeReportHandler interface for that can handle valid subscribe report params -type SubscribeReportHandler interface { - Handle(SubscribeReportParams) middleware.Responder -} - -// NewSubscribeReport creates a new http.Handler for the subscribe report operation -func NewSubscribeReport(ctx *middleware.Context, handler SubscribeReportHandler) *SubscribeReport { - return &SubscribeReport{Context: ctx, Handler: handler} -} - -/*SubscribeReport swagger:route POST /subscriptions/report report subscribeReport - -Subscribe a list of X2AP event triggers to receive "REPORT" messages sent by RAN or Subscribe to receive the content of gNB NRT table in REPORT message sent by RAN - -*/ -type SubscribeReport struct { - Context *middleware.Context - Handler SubscribeReportHandler -} - -func (o *SubscribeReport) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewSubscribeReportParams() - - 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) - -}