ds

package
v0.0.0-...-4958bdd Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for ds API

func (*Client) QueryMetricsWithExpressions

QueryMetricsWithExpressions data source query metrics with expressions

If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:query`.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

func WithAuthInfo

func WithAuthInfo(authInfo runtime.ClientAuthInfoWriter) ClientOption

WithAuthInfo changes the transport on the client

type ClientService

type ClientService interface {
	QueryMetricsWithExpressions(body *models.MetricRequest, opts ...ClientOption) (*QueryMetricsWithExpressionsOK, *QueryMetricsWithExpressionsMultiStatus, error)
	QueryMetricsWithExpressionsWithParams(params *QueryMetricsWithExpressionsParams, opts ...ClientOption) (*QueryMetricsWithExpressionsOK, *QueryMetricsWithExpressionsMultiStatus, 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 ds API client.

type QueryMetricsWithExpressionsBadRequest

type QueryMetricsWithExpressionsBadRequest struct {
	Payload *models.ErrorResponseBody
}

QueryMetricsWithExpressionsBadRequest describes a response with status code 400, with default header values.

BadRequestError is returned when the request is invalid and it cannot be processed.

func NewQueryMetricsWithExpressionsBadRequest

func NewQueryMetricsWithExpressionsBadRequest() *QueryMetricsWithExpressionsBadRequest

NewQueryMetricsWithExpressionsBadRequest creates a QueryMetricsWithExpressionsBadRequest with default headers values

func (*QueryMetricsWithExpressionsBadRequest) Code

Code gets the status code for the query metrics with expressions bad request response

func (*QueryMetricsWithExpressionsBadRequest) Error

func (*QueryMetricsWithExpressionsBadRequest) GetPayload

func (*QueryMetricsWithExpressionsBadRequest) IsClientError

func (o *QueryMetricsWithExpressionsBadRequest) IsClientError() bool

IsClientError returns true when this query metrics with expressions bad request response has a 4xx status code

func (*QueryMetricsWithExpressionsBadRequest) IsCode

IsCode returns true when this query metrics with expressions bad request response a status code equal to that given

func (*QueryMetricsWithExpressionsBadRequest) IsRedirect

IsRedirect returns true when this query metrics with expressions bad request response has a 3xx status code

func (*QueryMetricsWithExpressionsBadRequest) IsServerError

func (o *QueryMetricsWithExpressionsBadRequest) IsServerError() bool

IsServerError returns true when this query metrics with expressions bad request response has a 5xx status code

func (*QueryMetricsWithExpressionsBadRequest) IsSuccess

IsSuccess returns true when this query metrics with expressions bad request response has a 2xx status code

func (*QueryMetricsWithExpressionsBadRequest) String

type QueryMetricsWithExpressionsForbidden

type QueryMetricsWithExpressionsForbidden struct {
	Payload *models.ErrorResponseBody
}

QueryMetricsWithExpressionsForbidden describes a response with status code 403, with default header values.

ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.

func NewQueryMetricsWithExpressionsForbidden

func NewQueryMetricsWithExpressionsForbidden() *QueryMetricsWithExpressionsForbidden

NewQueryMetricsWithExpressionsForbidden creates a QueryMetricsWithExpressionsForbidden with default headers values

func (*QueryMetricsWithExpressionsForbidden) Code

Code gets the status code for the query metrics with expressions forbidden response

func (*QueryMetricsWithExpressionsForbidden) Error

func (*QueryMetricsWithExpressionsForbidden) GetPayload

func (*QueryMetricsWithExpressionsForbidden) IsClientError

func (o *QueryMetricsWithExpressionsForbidden) IsClientError() bool

IsClientError returns true when this query metrics with expressions forbidden response has a 4xx status code

func (*QueryMetricsWithExpressionsForbidden) IsCode

IsCode returns true when this query metrics with expressions forbidden response a status code equal to that given

func (*QueryMetricsWithExpressionsForbidden) IsRedirect

IsRedirect returns true when this query metrics with expressions forbidden response has a 3xx status code

func (*QueryMetricsWithExpressionsForbidden) IsServerError

func (o *QueryMetricsWithExpressionsForbidden) IsServerError() bool

IsServerError returns true when this query metrics with expressions forbidden response has a 5xx status code

func (*QueryMetricsWithExpressionsForbidden) IsSuccess

IsSuccess returns true when this query metrics with expressions forbidden response has a 2xx status code

func (*QueryMetricsWithExpressionsForbidden) String

type QueryMetricsWithExpressionsInternalServerError

type QueryMetricsWithExpressionsInternalServerError struct {
	Payload *models.ErrorResponseBody
}

QueryMetricsWithExpressionsInternalServerError describes a response with status code 500, with default header values.

InternalServerError is a general error indicating something went wrong internally.

func NewQueryMetricsWithExpressionsInternalServerError

func NewQueryMetricsWithExpressionsInternalServerError() *QueryMetricsWithExpressionsInternalServerError

NewQueryMetricsWithExpressionsInternalServerError creates a QueryMetricsWithExpressionsInternalServerError with default headers values

func (*QueryMetricsWithExpressionsInternalServerError) Code

Code gets the status code for the query metrics with expressions internal server error response

func (*QueryMetricsWithExpressionsInternalServerError) Error

func (*QueryMetricsWithExpressionsInternalServerError) GetPayload

func (*QueryMetricsWithExpressionsInternalServerError) IsClientError

IsClientError returns true when this query metrics with expressions internal server error response has a 4xx status code

func (*QueryMetricsWithExpressionsInternalServerError) IsCode

IsCode returns true when this query metrics with expressions internal server error response a status code equal to that given

func (*QueryMetricsWithExpressionsInternalServerError) IsRedirect

IsRedirect returns true when this query metrics with expressions internal server error response has a 3xx status code

func (*QueryMetricsWithExpressionsInternalServerError) IsServerError

IsServerError returns true when this query metrics with expressions internal server error response has a 5xx status code

func (*QueryMetricsWithExpressionsInternalServerError) IsSuccess

IsSuccess returns true when this query metrics with expressions internal server error response has a 2xx status code

func (*QueryMetricsWithExpressionsInternalServerError) String

type QueryMetricsWithExpressionsMultiStatus

type QueryMetricsWithExpressionsMultiStatus struct {
	Payload *models.QueryDataResponse
}

QueryMetricsWithExpressionsMultiStatus describes a response with status code 207, with default header values.

(empty)

func NewQueryMetricsWithExpressionsMultiStatus

func NewQueryMetricsWithExpressionsMultiStatus() *QueryMetricsWithExpressionsMultiStatus

NewQueryMetricsWithExpressionsMultiStatus creates a QueryMetricsWithExpressionsMultiStatus with default headers values

func (*QueryMetricsWithExpressionsMultiStatus) Code

Code gets the status code for the query metrics with expressions multi status response

func (*QueryMetricsWithExpressionsMultiStatus) Error

func (*QueryMetricsWithExpressionsMultiStatus) GetPayload

func (*QueryMetricsWithExpressionsMultiStatus) IsClientError

func (o *QueryMetricsWithExpressionsMultiStatus) IsClientError() bool

IsClientError returns true when this query metrics with expressions multi status response has a 4xx status code

func (*QueryMetricsWithExpressionsMultiStatus) IsCode

IsCode returns true when this query metrics with expressions multi status response a status code equal to that given

func (*QueryMetricsWithExpressionsMultiStatus) IsRedirect

IsRedirect returns true when this query metrics with expressions multi status response has a 3xx status code

func (*QueryMetricsWithExpressionsMultiStatus) IsServerError

func (o *QueryMetricsWithExpressionsMultiStatus) IsServerError() bool

IsServerError returns true when this query metrics with expressions multi status response has a 5xx status code

func (*QueryMetricsWithExpressionsMultiStatus) IsSuccess

IsSuccess returns true when this query metrics with expressions multi status response has a 2xx status code

func (*QueryMetricsWithExpressionsMultiStatus) String

type QueryMetricsWithExpressionsOK

type QueryMetricsWithExpressionsOK struct {
	Payload *models.QueryDataResponse
}

QueryMetricsWithExpressionsOK describes a response with status code 200, with default header values.

(empty)

func NewQueryMetricsWithExpressionsOK

func NewQueryMetricsWithExpressionsOK() *QueryMetricsWithExpressionsOK

NewQueryMetricsWithExpressionsOK creates a QueryMetricsWithExpressionsOK with default headers values

func (*QueryMetricsWithExpressionsOK) Code

Code gets the status code for the query metrics with expressions Ok response

func (*QueryMetricsWithExpressionsOK) Error

func (*QueryMetricsWithExpressionsOK) GetPayload

func (*QueryMetricsWithExpressionsOK) IsClientError

func (o *QueryMetricsWithExpressionsOK) IsClientError() bool

IsClientError returns true when this query metrics with expressions Ok response has a 4xx status code

func (*QueryMetricsWithExpressionsOK) IsCode

func (o *QueryMetricsWithExpressionsOK) IsCode(code int) bool

IsCode returns true when this query metrics with expressions Ok response a status code equal to that given

func (*QueryMetricsWithExpressionsOK) IsRedirect

func (o *QueryMetricsWithExpressionsOK) IsRedirect() bool

IsRedirect returns true when this query metrics with expressions Ok response has a 3xx status code

func (*QueryMetricsWithExpressionsOK) IsServerError

func (o *QueryMetricsWithExpressionsOK) IsServerError() bool

IsServerError returns true when this query metrics with expressions Ok response has a 5xx status code

func (*QueryMetricsWithExpressionsOK) IsSuccess

func (o *QueryMetricsWithExpressionsOK) IsSuccess() bool

IsSuccess returns true when this query metrics with expressions Ok response has a 2xx status code

func (*QueryMetricsWithExpressionsOK) String

type QueryMetricsWithExpressionsParams

type QueryMetricsWithExpressionsParams struct {

	// Body.
	Body *models.MetricRequest

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

QueryMetricsWithExpressionsParams contains all the parameters to send to the API endpoint

for the query metrics with expressions operation.

Typically these are written to a http.Request.

func NewQueryMetricsWithExpressionsParams

func NewQueryMetricsWithExpressionsParams() *QueryMetricsWithExpressionsParams

NewQueryMetricsWithExpressionsParams creates a new QueryMetricsWithExpressionsParams 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 NewQueryMetricsWithExpressionsParamsWithContext

func NewQueryMetricsWithExpressionsParamsWithContext(ctx context.Context) *QueryMetricsWithExpressionsParams

NewQueryMetricsWithExpressionsParamsWithContext creates a new QueryMetricsWithExpressionsParams object with the ability to set a context for a request.

func NewQueryMetricsWithExpressionsParamsWithHTTPClient

func NewQueryMetricsWithExpressionsParamsWithHTTPClient(client *http.Client) *QueryMetricsWithExpressionsParams

NewQueryMetricsWithExpressionsParamsWithHTTPClient creates a new QueryMetricsWithExpressionsParams object with the ability to set a custom HTTPClient for a request.

func NewQueryMetricsWithExpressionsParamsWithTimeout

func NewQueryMetricsWithExpressionsParamsWithTimeout(timeout time.Duration) *QueryMetricsWithExpressionsParams

NewQueryMetricsWithExpressionsParamsWithTimeout creates a new QueryMetricsWithExpressionsParams object with the ability to set a timeout on a request.

func (*QueryMetricsWithExpressionsParams) SetBody

SetBody adds the body to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) SetContext

SetContext adds the context to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) SetDefaults

func (o *QueryMetricsWithExpressionsParams) SetDefaults()

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

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

func (*QueryMetricsWithExpressionsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) SetTimeout

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

SetTimeout adds the timeout to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) WithBody

WithBody adds the body to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) WithContext

WithContext adds the context to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) WithDefaults

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

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

func (*QueryMetricsWithExpressionsParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) WithTimeout

WithTimeout adds the timeout to the query metrics with expressions params

func (*QueryMetricsWithExpressionsParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type QueryMetricsWithExpressionsReader

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

QueryMetricsWithExpressionsReader is a Reader for the QueryMetricsWithExpressions structure.

func (*QueryMetricsWithExpressionsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type QueryMetricsWithExpressionsUnauthorized

type QueryMetricsWithExpressionsUnauthorized struct {
	Payload *models.ErrorResponseBody
}

QueryMetricsWithExpressionsUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewQueryMetricsWithExpressionsUnauthorized

func NewQueryMetricsWithExpressionsUnauthorized() *QueryMetricsWithExpressionsUnauthorized

NewQueryMetricsWithExpressionsUnauthorized creates a QueryMetricsWithExpressionsUnauthorized with default headers values

func (*QueryMetricsWithExpressionsUnauthorized) Code

Code gets the status code for the query metrics with expressions unauthorized response

func (*QueryMetricsWithExpressionsUnauthorized) Error

func (*QueryMetricsWithExpressionsUnauthorized) GetPayload

func (*QueryMetricsWithExpressionsUnauthorized) IsClientError

func (o *QueryMetricsWithExpressionsUnauthorized) IsClientError() bool

IsClientError returns true when this query metrics with expressions unauthorized response has a 4xx status code

func (*QueryMetricsWithExpressionsUnauthorized) IsCode

IsCode returns true when this query metrics with expressions unauthorized response a status code equal to that given

func (*QueryMetricsWithExpressionsUnauthorized) IsRedirect

IsRedirect returns true when this query metrics with expressions unauthorized response has a 3xx status code

func (*QueryMetricsWithExpressionsUnauthorized) IsServerError

func (o *QueryMetricsWithExpressionsUnauthorized) IsServerError() bool

IsServerError returns true when this query metrics with expressions unauthorized response has a 5xx status code

func (*QueryMetricsWithExpressionsUnauthorized) IsSuccess

IsSuccess returns true when this query metrics with expressions unauthorized response has a 2xx status code

func (*QueryMetricsWithExpressionsUnauthorized) String

Jump to

Keyboard shortcuts

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