filters

package
v2.18.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: AGPL-3.0 Imports: 12 Imported by: 3

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 filters API

func (*Client) Get

func (a *Client) Get(params *GetParams) (*GetOK, error)

Get gets gets map of metrics names

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	Get(params *GetParams) (*GetOK, 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 filters API client.

type DetailsItems0

type DetailsItems0 struct {

	// type url
	TypeURL string `json:"type_url,omitempty"`

	// value
	// Format: byte
	Value strfmt.Base64 `json:"value,omitempty"`
}

DetailsItems0 details items0 swagger:model DetailsItems0

func (*DetailsItems0) MarshalBinary

func (o *DetailsItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*DetailsItems0) UnmarshalBinary

func (o *DetailsItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*DetailsItems0) Validate

func (o *DetailsItems0) Validate(formats strfmt.Registry) error

Validate validates this details items0

type GetBody

type GetBody struct {

	// period start from
	// Format: date-time
	PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"`

	// period start to
	// Format: date-time
	PeriodStartTo strfmt.DateTime `json:"period_start_to,omitempty"`

	// main metric name
	MainMetricName string `json:"main_metric_name,omitempty"`

	// labels
	Labels []*LabelsItems0 `json:"labels"`
}

GetBody FiltersRequest contains period for which we need filters. swagger:model GetBody

func (*GetBody) MarshalBinary

func (o *GetBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetBody) UnmarshalBinary

func (o *GetBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetBody) Validate

func (o *GetBody) Validate(formats strfmt.Registry) error

Validate validates this get body

type GetDefault

type GetDefault struct {
	Payload *GetDefaultBody
	// contains filtered or unexported fields
}

GetDefault handles this case with default header values.

An unexpected error response.

func NewGetDefault

func NewGetDefault(code int) *GetDefault

NewGetDefault creates a GetDefault with default headers values

func (*GetDefault) Code

func (o *GetDefault) Code() int

Code gets the status code for the get default response

func (*GetDefault) Error

func (o *GetDefault) Error() string

func (*GetDefault) GetPayload

func (o *GetDefault) GetPayload() *GetDefaultBody

type GetDefaultBody

type GetDefaultBody struct {

	// error
	Error string `json:"error,omitempty"`

	// code
	Code int32 `json:"code,omitempty"`

	// message
	Message string `json:"message,omitempty"`

	// details
	Details []*DetailsItems0 `json:"details"`
}

GetDefaultBody get default body swagger:model GetDefaultBody

func (*GetDefaultBody) MarshalBinary

func (o *GetDefaultBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetDefaultBody) UnmarshalBinary

func (o *GetDefaultBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetDefaultBody) Validate

func (o *GetDefaultBody) Validate(formats strfmt.Registry) error

Validate validates this get default body

type GetOK

type GetOK struct {
	Payload *GetOKBody
}

GetOK handles this case with default header values.

A successful response.

func NewGetOK

func NewGetOK() *GetOK

NewGetOK creates a GetOK with default headers values

func (*GetOK) Error

func (o *GetOK) Error() string

func (*GetOK) GetPayload

func (o *GetOK) GetPayload() *GetOKBody

type GetOKBody

type GetOKBody struct {

	// labels
	Labels map[string]LabelsAnon `json:"labels,omitempty"`
}

GetOKBody FiltersReply is map of labels for given period by key. // Key is label's name and value is label's value and how many times it occur. swagger:model GetOKBody

func (*GetOKBody) MarshalBinary

func (o *GetOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetOKBody) UnmarshalBinary

func (o *GetOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetOKBody) Validate

func (o *GetOKBody) Validate(formats strfmt.Registry) error

Validate validates this get OK body

type GetParams

type GetParams struct {

	/*Body*/
	Body GetBody

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

GetParams contains all the parameters to send to the API endpoint for the get operation typically these are written to a http.Request

func NewGetParams

func NewGetParams() *GetParams

NewGetParams creates a new GetParams object with the default values initialized.

func NewGetParamsWithContext

func NewGetParamsWithContext(ctx context.Context) *GetParams

NewGetParamsWithContext creates a new GetParams object with the default values initialized, and the ability to set a context for a request

func NewGetParamsWithHTTPClient

func NewGetParamsWithHTTPClient(client *http.Client) *GetParams

NewGetParamsWithHTTPClient creates a new GetParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetParamsWithTimeout

func NewGetParamsWithTimeout(timeout time.Duration) *GetParams

NewGetParamsWithTimeout creates a new GetParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetParams) SetBody

func (o *GetParams) SetBody(body GetBody)

SetBody adds the body to the get params

func (*GetParams) SetContext

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

SetContext adds the context to the get params

func (*GetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get params

func (*GetParams) SetTimeout

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

SetTimeout adds the timeout to the get params

func (*GetParams) WithBody

func (o *GetParams) WithBody(body GetBody) *GetParams

WithBody adds the body to the get params

func (*GetParams) WithContext

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

WithContext adds the context to the get params

func (*GetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get params

func (*GetParams) WithTimeout

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

WithTimeout adds the timeout to the get params

func (*GetParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetReader

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

GetReader is a Reader for the Get structure.

func (*GetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type LabelsAnon

type LabelsAnon struct {

	// name
	Name []*LabelsAnonNameItems0 `json:"name"`
}

LabelsAnon ListLabels is list of label's values: duplicates are impossible. swagger:model LabelsAnon

func (*LabelsAnon) MarshalBinary

func (o *LabelsAnon) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LabelsAnon) UnmarshalBinary

func (o *LabelsAnon) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LabelsAnon) Validate

func (o *LabelsAnon) Validate(formats strfmt.Registry) error

Validate validates this labels anon

type LabelsAnonNameItems0

type LabelsAnonNameItems0 struct {

	// value
	Value string `json:"value,omitempty"`

	// main metric percent
	MainMetricPercent float32 `json:"main_metric_percent,omitempty"`

	// main metric per sec
	MainMetricPerSec float32 `json:"main_metric_per_sec,omitempty"`
}

LabelsAnonNameItems0 Values is label values and main metric percent and per second. swagger:model LabelsAnonNameItems0

func (*LabelsAnonNameItems0) MarshalBinary

func (o *LabelsAnonNameItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LabelsAnonNameItems0) UnmarshalBinary

func (o *LabelsAnonNameItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LabelsAnonNameItems0) Validate

func (o *LabelsAnonNameItems0) Validate(formats strfmt.Registry) error

Validate validates this labels anon name items0

type LabelsItems0

type LabelsItems0 struct {

	// key
	Key string `json:"key,omitempty"`

	// value
	Value []string `json:"value"`
}

LabelsItems0 MapFieldEntry allows to pass labels/dimensions in form like {"server": ["db1", "db2"...]}. swagger:model LabelsItems0

func (*LabelsItems0) MarshalBinary

func (o *LabelsItems0) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LabelsItems0) UnmarshalBinary

func (o *LabelsItems0) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LabelsItems0) Validate

func (o *LabelsItems0) Validate(formats strfmt.Registry) error

Validate validates this labels items0

Jump to

Keyboard shortcuts

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