X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fclientapi%2Fquery%2Fquery_client.go;fp=pkg%2Fclientapi%2Fquery%2Fquery_client.go;h=a73fd7e33dd3f6f4fb2538a46048fe16476d8e88;hb=9568a2d73b96516b27f54650e309f0d157fb97d9;hp=0000000000000000000000000000000000000000;hpb=b4c7039b6a720c2b35deb79b3018472243677c70;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/clientapi/query/query_client.go b/pkg/clientapi/query/query_client.go new file mode 100644 index 0000000..a73fd7e --- /dev/null +++ b/pkg/clientapi/query/query_client.go @@ -0,0 +1,58 @@ +// 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 swagger generate command + +import ( + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" +) + +// New creates a new query API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client for query API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +/* +GetAllSubscriptions returns list of subscriptions +*/ +func (a *Client) GetAllSubscriptions(params *GetAllSubscriptionsParams) (*GetAllSubscriptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAllSubscriptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getAllSubscriptions", + Method: "GET", + PathPattern: "/subscriptions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{""}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAllSubscriptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + return result.(*GetAllSubscriptionsOK), nil + +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +}