+++ /dev/null
-// Code generated by go-swagger; DO NOT EDIT.
-
-package query
-
-// 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"
-)
-
-// GetAllSubscriptionsHandlerFunc turns a function with the right signature into a get all subscriptions handler
-type GetAllSubscriptionsHandlerFunc func(GetAllSubscriptionsParams) middleware.Responder
-
-// Handle executing the request and returning a response
-func (fn GetAllSubscriptionsHandlerFunc) Handle(params GetAllSubscriptionsParams) middleware.Responder {
- return fn(params)
-}
-
-// GetAllSubscriptionsHandler interface for that can handle valid get all subscriptions params
-type GetAllSubscriptionsHandler interface {
- Handle(GetAllSubscriptionsParams) middleware.Responder
-}
-
-// NewGetAllSubscriptions creates a new http.Handler for the get all subscriptions operation
-func NewGetAllSubscriptions(ctx *middleware.Context, handler GetAllSubscriptionsHandler) *GetAllSubscriptions {
- return &GetAllSubscriptions{Context: ctx, Handler: handler}
-}
-
-/*GetAllSubscriptions swagger:route GET /subscriptions query getAllSubscriptions
-
-Returns list of subscriptions
-
-*/
-type GetAllSubscriptions struct {
- Context *middleware.Context
- Handler GetAllSubscriptionsHandler
-}
-
-func (o *GetAllSubscriptions) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
- route, rCtx, _ := o.Context.RouteInfo(r)
- if rCtx != nil {
- r = rCtx
- }
- var Params = NewGetAllSubscriptionsParams()
-
- 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)
-
-}