simple_json

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationQueryOK

type AnnotationQueryOK struct {
	Payload *v1.Annotations
}
AnnotationQueryOK describes a response with status code 200, with default header values.

get annotations successfully.

func NewAnnotationQueryOK

func NewAnnotationQueryOK() *AnnotationQueryOK

NewAnnotationQueryOK creates a AnnotationQueryOK with default headers values

func (*AnnotationQueryOK) Error

func (o *AnnotationQueryOK) Error() string

func (*AnnotationQueryOK) GetPayload added in v1.1.0

func (o *AnnotationQueryOK) GetPayload() *v1.Annotations

type AnnotationQueryParams

type AnnotationQueryParams struct {

	/* Options.

	   The options to query.
	*/
	Options *v1.Target

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

AnnotationQueryParams contains all the parameters to send to the API endpoint

for the annotation query operation.

Typically these are written to a http.Request.

func NewAnnotationQueryParams

func NewAnnotationQueryParams() *AnnotationQueryParams

NewAnnotationQueryParams creates a new AnnotationQueryParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewAnnotationQueryParamsWithContext

func NewAnnotationQueryParamsWithContext(ctx context.Context) *AnnotationQueryParams

NewAnnotationQueryParamsWithContext creates a new AnnotationQueryParams object with the ability to set a context for a request.

func NewAnnotationQueryParamsWithHTTPClient

func NewAnnotationQueryParamsWithHTTPClient(client *http.Client) *AnnotationQueryParams

NewAnnotationQueryParamsWithHTTPClient creates a new AnnotationQueryParams object with the ability to set a custom HTTPClient for a request.

func NewAnnotationQueryParamsWithTimeout

func NewAnnotationQueryParamsWithTimeout(timeout time.Duration) *AnnotationQueryParams

NewAnnotationQueryParamsWithTimeout creates a new AnnotationQueryParams object with the ability to set a timeout on a request.

func (*AnnotationQueryParams) SetContext

func (o *AnnotationQueryParams) SetContext(ctx context.Context)

SetContext adds the context to the annotation query params

func (*AnnotationQueryParams) SetDefaults added in v1.1.0

func (o *AnnotationQueryParams) SetDefaults()

SetDefaults hydrates default values in the annotation query params (not the query body).

All values with no default are reset to their zero value.

func (*AnnotationQueryParams) SetHTTPClient

func (o *AnnotationQueryParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the annotation query params

func (*AnnotationQueryParams) SetOptions

func (o *AnnotationQueryParams) SetOptions(options *v1.Target)

SetOptions adds the options to the annotation query params

func (*AnnotationQueryParams) SetTimeout

func (o *AnnotationQueryParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the annotation query params

func (*AnnotationQueryParams) WithContext

WithContext adds the context to the annotation query params

func (*AnnotationQueryParams) WithDefaults added in v1.1.0

func (o *AnnotationQueryParams) WithDefaults() *AnnotationQueryParams

WithDefaults hydrates default values in the annotation query params (not the query body).

All values with no default are reset to their zero value.

func (*AnnotationQueryParams) WithHTTPClient

func (o *AnnotationQueryParams) WithHTTPClient(client *http.Client) *AnnotationQueryParams

WithHTTPClient adds the HTTPClient to the annotation query params

func (*AnnotationQueryParams) WithOptions

func (o *AnnotationQueryParams) WithOptions(options *v1.Target) *AnnotationQueryParams

WithOptions adds the options to the annotation query params

func (*AnnotationQueryParams) WithTimeout

func (o *AnnotationQueryParams) WithTimeout(timeout time.Duration) *AnnotationQueryParams

WithTimeout adds the timeout to the annotation query params

func (*AnnotationQueryParams) WriteToRequest

func (o *AnnotationQueryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type AnnotationQueryReader

type AnnotationQueryReader struct {
	// contains filtered or unexported fields
}

AnnotationQueryReader is a Reader for the AnnotationQuery structure.

func (*AnnotationQueryReader) ReadResponse

func (o *AnnotationQueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for simple json API

func (*Client) AnnotationQuery

func (a *Client) AnnotationQuery(params *AnnotationQueryParams, opts ...ClientOption) (*AnnotationQueryOK, error)

AnnotationQuery gets annotations

used by dashboards to get annotations.

func (*Client) MetricFindQuery

func (a *Client) MetricFindQuery(params *MetricFindQueryParams, opts ...ClientOption) (*MetricFindQueryOK, error)

MetricFindQuery finds metric options

used by the find metric options on the query tab in panels.

func (*Client) Query

func (a *Client) Query(params *QueryParams, opts ...ClientOption) (*QueryOK, error)

Query queries data

used by panels to get data

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) TestDatasource

func (a *Client) TestDatasource(params *TestDatasourceParams, opts ...ClientOption) (*TestDatasourceOK, error)

TestDatasource tests connection

should return 200 ok. Used for "Test connection" on the datasource config page.

type ClientOption added in v1.1.0

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService added in v1.1.0

type ClientService interface {
	AnnotationQuery(params *AnnotationQueryParams, opts ...ClientOption) (*AnnotationQueryOK, error)

	MetricFindQuery(params *MetricFindQueryParams, opts ...ClientOption) (*MetricFindQueryOK, error)

	Query(params *QueryParams, opts ...ClientOption) (*QueryOK, error)

	TestDatasource(params *TestDatasourceParams, opts ...ClientOption) (*TestDatasourceOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new simple json API client.

type MetricFindQueryOK

type MetricFindQueryOK struct {
	Payload interface{}
}
MetricFindQueryOK describes a response with status code 200, with default header values.

find metric options successfully.

func NewMetricFindQueryOK

func NewMetricFindQueryOK() *MetricFindQueryOK

NewMetricFindQueryOK creates a MetricFindQueryOK with default headers values

func (*MetricFindQueryOK) Error

func (o *MetricFindQueryOK) Error() string

func (*MetricFindQueryOK) GetPayload added in v1.1.0

func (o *MetricFindQueryOK) GetPayload() interface{}

type MetricFindQueryParams

type MetricFindQueryParams struct {

	/* Options.

	   The options to query.
	*/
	Options *v1.Target

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

MetricFindQueryParams contains all the parameters to send to the API endpoint

for the metric find query operation.

Typically these are written to a http.Request.

func NewMetricFindQueryParams

func NewMetricFindQueryParams() *MetricFindQueryParams

NewMetricFindQueryParams creates a new MetricFindQueryParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewMetricFindQueryParamsWithContext

func NewMetricFindQueryParamsWithContext(ctx context.Context) *MetricFindQueryParams

NewMetricFindQueryParamsWithContext creates a new MetricFindQueryParams object with the ability to set a context for a request.

func NewMetricFindQueryParamsWithHTTPClient

func NewMetricFindQueryParamsWithHTTPClient(client *http.Client) *MetricFindQueryParams

NewMetricFindQueryParamsWithHTTPClient creates a new MetricFindQueryParams object with the ability to set a custom HTTPClient for a request.

func NewMetricFindQueryParamsWithTimeout

func NewMetricFindQueryParamsWithTimeout(timeout time.Duration) *MetricFindQueryParams

NewMetricFindQueryParamsWithTimeout creates a new MetricFindQueryParams object with the ability to set a timeout on a request.

func (*MetricFindQueryParams) SetContext

func (o *MetricFindQueryParams) SetContext(ctx context.Context)

SetContext adds the context to the metric find query params

func (*MetricFindQueryParams) SetDefaults added in v1.1.0

func (o *MetricFindQueryParams) SetDefaults()

SetDefaults hydrates default values in the metric find query params (not the query body).

All values with no default are reset to their zero value.

func (*MetricFindQueryParams) SetHTTPClient

func (o *MetricFindQueryParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the metric find query params

func (*MetricFindQueryParams) SetOptions

func (o *MetricFindQueryParams) SetOptions(options *v1.Target)

SetOptions adds the options to the metric find query params

func (*MetricFindQueryParams) SetTimeout

func (o *MetricFindQueryParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the metric find query params

func (*MetricFindQueryParams) WithContext

WithContext adds the context to the metric find query params

func (*MetricFindQueryParams) WithDefaults added in v1.1.0

func (o *MetricFindQueryParams) WithDefaults() *MetricFindQueryParams

WithDefaults hydrates default values in the metric find query params (not the query body).

All values with no default are reset to their zero value.

func (*MetricFindQueryParams) WithHTTPClient

func (o *MetricFindQueryParams) WithHTTPClient(client *http.Client) *MetricFindQueryParams

WithHTTPClient adds the HTTPClient to the metric find query params

func (*MetricFindQueryParams) WithOptions

func (o *MetricFindQueryParams) WithOptions(options *v1.Target) *MetricFindQueryParams

WithOptions adds the options to the metric find query params

func (*MetricFindQueryParams) WithTimeout

func (o *MetricFindQueryParams) WithTimeout(timeout time.Duration) *MetricFindQueryParams

WithTimeout adds the timeout to the metric find query params

func (*MetricFindQueryParams) WriteToRequest

func (o *MetricFindQueryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type MetricFindQueryReader

type MetricFindQueryReader struct {
	// contains filtered or unexported fields
}

MetricFindQueryReader is a Reader for the MetricFindQuery structure.

func (*MetricFindQueryReader) ReadResponse

func (o *MetricFindQueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type QueryOK

type QueryOK struct {
	Payload v1.Timeseries
}
QueryOK describes a response with status code 200, with default header values.

query data successfully.

func NewQueryOK

func NewQueryOK() *QueryOK

NewQueryOK creates a QueryOK with default headers values

func (*QueryOK) Error

func (o *QueryOK) Error() string

func (*QueryOK) GetPayload added in v1.1.0

func (o *QueryOK) GetPayload() v1.Timeseries

type QueryParams

type QueryParams struct {

	/* Options.

	   The options to query.
	*/
	Options *v1.Query

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

QueryParams contains all the parameters to send to the API endpoint

for the query operation.

Typically these are written to a http.Request.

func NewQueryParams

func NewQueryParams() *QueryParams

NewQueryParams creates a new QueryParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewQueryParamsWithContext

func NewQueryParamsWithContext(ctx context.Context) *QueryParams

NewQueryParamsWithContext creates a new QueryParams object with the ability to set a context for a request.

func NewQueryParamsWithHTTPClient

func NewQueryParamsWithHTTPClient(client *http.Client) *QueryParams

NewQueryParamsWithHTTPClient creates a new QueryParams object with the ability to set a custom HTTPClient for a request.

func NewQueryParamsWithTimeout

func NewQueryParamsWithTimeout(timeout time.Duration) *QueryParams

NewQueryParamsWithTimeout creates a new QueryParams object with the ability to set a timeout on a request.

func (*QueryParams) SetContext

func (o *QueryParams) SetContext(ctx context.Context)

SetContext adds the context to the query params

func (*QueryParams) SetDefaults added in v1.1.0

func (o *QueryParams) SetDefaults()

SetDefaults hydrates default values in the query params (not the query body).

All values with no default are reset to their zero value.

func (*QueryParams) SetHTTPClient

func (o *QueryParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the query params

func (*QueryParams) SetOptions

func (o *QueryParams) SetOptions(options *v1.Query)

SetOptions adds the options to the query params

func (*QueryParams) SetTimeout

func (o *QueryParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the query params

func (*QueryParams) WithContext

func (o *QueryParams) WithContext(ctx context.Context) *QueryParams

WithContext adds the context to the query params

func (*QueryParams) WithDefaults added in v1.1.0

func (o *QueryParams) WithDefaults() *QueryParams

WithDefaults hydrates default values in the query params (not the query body).

All values with no default are reset to their zero value.

func (*QueryParams) WithHTTPClient

func (o *QueryParams) WithHTTPClient(client *http.Client) *QueryParams

WithHTTPClient adds the HTTPClient to the query params

func (*QueryParams) WithOptions

func (o *QueryParams) WithOptions(options *v1.Query) *QueryParams

WithOptions adds the options to the query params

func (*QueryParams) WithTimeout

func (o *QueryParams) WithTimeout(timeout time.Duration) *QueryParams

WithTimeout adds the timeout to the query params

func (*QueryParams) WriteToRequest

func (o *QueryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type QueryReader

type QueryReader struct {
	// contains filtered or unexported fields
}

QueryReader is a Reader for the Query structure.

func (*QueryReader) ReadResponse

func (o *QueryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type TestDatasourceOK

type TestDatasourceOK struct {
}
TestDatasourceOK describes a response with status code 200, with default header values.

connection successfully.

func NewTestDatasourceOK

func NewTestDatasourceOK() *TestDatasourceOK

NewTestDatasourceOK creates a TestDatasourceOK with default headers values

func (*TestDatasourceOK) Error

func (o *TestDatasourceOK) Error() string

type TestDatasourceParams

type TestDatasourceParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

TestDatasourceParams contains all the parameters to send to the API endpoint

for the test datasource operation.

Typically these are written to a http.Request.

func NewTestDatasourceParams

func NewTestDatasourceParams() *TestDatasourceParams

NewTestDatasourceParams creates a new TestDatasourceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewTestDatasourceParamsWithContext

func NewTestDatasourceParamsWithContext(ctx context.Context) *TestDatasourceParams

NewTestDatasourceParamsWithContext creates a new TestDatasourceParams object with the ability to set a context for a request.

func NewTestDatasourceParamsWithHTTPClient

func NewTestDatasourceParamsWithHTTPClient(client *http.Client) *TestDatasourceParams

NewTestDatasourceParamsWithHTTPClient creates a new TestDatasourceParams object with the ability to set a custom HTTPClient for a request.

func NewTestDatasourceParamsWithTimeout

func NewTestDatasourceParamsWithTimeout(timeout time.Duration) *TestDatasourceParams

NewTestDatasourceParamsWithTimeout creates a new TestDatasourceParams object with the ability to set a timeout on a request.

func (*TestDatasourceParams) SetContext

func (o *TestDatasourceParams) SetContext(ctx context.Context)

SetContext adds the context to the test datasource params

func (*TestDatasourceParams) SetDefaults added in v1.1.0

func (o *TestDatasourceParams) SetDefaults()

SetDefaults hydrates default values in the test datasource params (not the query body).

All values with no default are reset to their zero value.

func (*TestDatasourceParams) SetHTTPClient

func (o *TestDatasourceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the test datasource params

func (*TestDatasourceParams) SetTimeout

func (o *TestDatasourceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the test datasource params

func (*TestDatasourceParams) WithContext

WithContext adds the context to the test datasource params

func (*TestDatasourceParams) WithDefaults added in v1.1.0

func (o *TestDatasourceParams) WithDefaults() *TestDatasourceParams

WithDefaults hydrates default values in the test datasource params (not the query body).

All values with no default are reset to their zero value.

func (*TestDatasourceParams) WithHTTPClient

func (o *TestDatasourceParams) WithHTTPClient(client *http.Client) *TestDatasourceParams

WithHTTPClient adds the HTTPClient to the test datasource params

func (*TestDatasourceParams) WithTimeout

func (o *TestDatasourceParams) WithTimeout(timeout time.Duration) *TestDatasourceParams

WithTimeout adds the timeout to the test datasource params

func (*TestDatasourceParams) WriteToRequest

func (o *TestDatasourceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type TestDatasourceReader

type TestDatasourceReader struct {
	// contains filtered or unexported fields
}

TestDatasourceReader is a Reader for the TestDatasource structure.

func (*TestDatasourceReader) ReadResponse

func (o *TestDatasourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL