templates

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TemplatesItems0SeveritySEVERITYINVALID captures enum value "SEVERITY_INVALID"
	TemplatesItems0SeveritySEVERITYINVALID string = "SEVERITY_INVALID"

	// TemplatesItems0SeveritySEVERITYEMERGENCY captures enum value "SEVERITY_EMERGENCY"
	TemplatesItems0SeveritySEVERITYEMERGENCY string = "SEVERITY_EMERGENCY"

	// TemplatesItems0SeveritySEVERITYALERT captures enum value "SEVERITY_ALERT"
	TemplatesItems0SeveritySEVERITYALERT string = "SEVERITY_ALERT"

	// TemplatesItems0SeveritySEVERITYCRITICAL captures enum value "SEVERITY_CRITICAL"
	TemplatesItems0SeveritySEVERITYCRITICAL string = "SEVERITY_CRITICAL"

	// TemplatesItems0SeveritySEVERITYERROR captures enum value "SEVERITY_ERROR"
	TemplatesItems0SeveritySEVERITYERROR string = "SEVERITY_ERROR"

	// TemplatesItems0SeveritySEVERITYWARNING captures enum value "SEVERITY_WARNING"
	TemplatesItems0SeveritySEVERITYWARNING string = "SEVERITY_WARNING"

	// TemplatesItems0SeveritySEVERITYNOTICE captures enum value "SEVERITY_NOTICE"
	TemplatesItems0SeveritySEVERITYNOTICE string = "SEVERITY_NOTICE"

	// TemplatesItems0SeveritySEVERITYINFO captures enum value "SEVERITY_INFO"
	TemplatesItems0SeveritySEVERITYINFO string = "SEVERITY_INFO"

	// TemplatesItems0SeveritySEVERITYDEBUG captures enum value "SEVERITY_DEBUG"
	TemplatesItems0SeveritySEVERITYDEBUG string = "SEVERITY_DEBUG"
)
View Source
const (

	// TemplatesItems0SourceTEMPLATESOURCEINVALID captures enum value "TEMPLATE_SOURCE_INVALID"
	TemplatesItems0SourceTEMPLATESOURCEINVALID string = "TEMPLATE_SOURCE_INVALID"

	// TemplatesItems0SourceBUILTIN captures enum value "BUILT_IN"
	TemplatesItems0SourceBUILTIN string = "BUILT_IN"

	// TemplatesItems0SourceSAAS captures enum value "SAAS"
	TemplatesItems0SourceSAAS string = "SAAS"

	// TemplatesItems0SourceUSERFILE captures enum value "USER_FILE"
	TemplatesItems0SourceUSERFILE string = "USER_FILE"

	// TemplatesItems0SourceUSERAPI captures enum value "USER_API"
	TemplatesItems0SourceUSERAPI string = "USER_API"
)
View Source
const (

	// TemplatesItems0ParamsItems0UnitPARAMUNITINVALID captures enum value "PARAM_UNIT_INVALID"
	TemplatesItems0ParamsItems0UnitPARAMUNITINVALID string = "PARAM_UNIT_INVALID"

	// TemplatesItems0ParamsItems0UnitPERCENTAGE captures enum value "PERCENTAGE"
	TemplatesItems0ParamsItems0UnitPERCENTAGE string = "PERCENTAGE"

	// TemplatesItems0ParamsItems0UnitSECONDS captures enum value "SECONDS"
	TemplatesItems0ParamsItems0UnitSECONDS string = "SECONDS"
)
View Source
const (

	// TemplatesItems0ParamsItems0TypePARAMTYPEINVALID captures enum value "PARAM_TYPE_INVALID"
	TemplatesItems0ParamsItems0TypePARAMTYPEINVALID string = "PARAM_TYPE_INVALID"

	// TemplatesItems0ParamsItems0TypeBOOL captures enum value "BOOL"
	TemplatesItems0ParamsItems0TypeBOOL string = "BOOL"

	// TemplatesItems0ParamsItems0TypeFLOAT captures enum value "FLOAT"
	TemplatesItems0ParamsItems0TypeFLOAT string = "FLOAT"

	// TemplatesItems0ParamsItems0TypeSTRING captures enum value "STRING"
	TemplatesItems0ParamsItems0TypeSTRING string = "STRING"
)
View Source
const (

	// TemplatesItems0ParamsItems0BoolDefaultDONOTCHANGE captures enum value "DO_NOT_CHANGE"
	TemplatesItems0ParamsItems0BoolDefaultDONOTCHANGE string = "DO_NOT_CHANGE"

	// TemplatesItems0ParamsItems0BoolDefaultTRUE captures enum value "TRUE"
	TemplatesItems0ParamsItems0BoolDefaultTRUE string = "TRUE"

	// TemplatesItems0ParamsItems0BoolDefaultFALSE captures enum value "FALSE"
	TemplatesItems0ParamsItems0BoolDefaultFALSE string = "FALSE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for templates API

func (*Client) CreateTemplate

func (a *Client) CreateTemplate(params *CreateTemplateParams) (*CreateTemplateOK, error)

CreateTemplate creates template creates a new template

func (*Client) DeleteTemplate

func (a *Client) DeleteTemplate(params *DeleteTemplateParams) (*DeleteTemplateOK, error)

DeleteTemplate deletes template deletes existing previously created via API

func (*Client) ListTemplates

func (a *Client) ListTemplates(params *ListTemplatesParams) (*ListTemplatesOK, error)

ListTemplates lists templates returns a list of all collected alert rule templates

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) UpdateTemplate

func (a *Client) UpdateTemplate(params *UpdateTemplateParams) (*UpdateTemplateOK, error)

UpdateTemplate updates template updates existing template previously created via API

type ClientService

type ClientService interface {
	CreateTemplate(params *CreateTemplateParams) (*CreateTemplateOK, error)

	DeleteTemplate(params *DeleteTemplateParams) (*DeleteTemplateOK, error)

	ListTemplates(params *ListTemplatesParams) (*ListTemplatesOK, error)

	UpdateTemplate(params *UpdateTemplateParams) (*UpdateTemplateOK, 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 templates API client.

type CreateTemplateBody

type CreateTemplateBody struct {

	// YAML (or JSON) template file content.
	Yaml string `json:"yaml,omitempty"`
}

CreateTemplateBody create template body swagger:model CreateTemplateBody

func (*CreateTemplateBody) MarshalBinary

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

MarshalBinary interface implementation

func (*CreateTemplateBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*CreateTemplateBody) Validate

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

Validate validates this create template body

type CreateTemplateDefault

type CreateTemplateDefault struct {
	Payload *CreateTemplateDefaultBody
	// contains filtered or unexported fields
}

CreateTemplateDefault handles this case with default header values.

An unexpected error response.

func NewCreateTemplateDefault

func NewCreateTemplateDefault(code int) *CreateTemplateDefault

NewCreateTemplateDefault creates a CreateTemplateDefault with default headers values

func (*CreateTemplateDefault) Code

func (o *CreateTemplateDefault) Code() int

Code gets the status code for the create template default response

func (*CreateTemplateDefault) Error

func (o *CreateTemplateDefault) Error() string

func (*CreateTemplateDefault) GetPayload

type CreateTemplateDefaultBody

type CreateTemplateDefaultBody struct {

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

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

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

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

CreateTemplateDefaultBody create template default body swagger:model CreateTemplateDefaultBody

func (*CreateTemplateDefaultBody) MarshalBinary

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

MarshalBinary interface implementation

func (*CreateTemplateDefaultBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*CreateTemplateDefaultBody) Validate

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

Validate validates this create template default body

type CreateTemplateOK

type CreateTemplateOK struct {
	Payload interface{}
}

CreateTemplateOK handles this case with default header values.

A successful response.

func NewCreateTemplateOK

func NewCreateTemplateOK() *CreateTemplateOK

NewCreateTemplateOK creates a CreateTemplateOK with default headers values

func (*CreateTemplateOK) Error

func (o *CreateTemplateOK) Error() string

func (*CreateTemplateOK) GetPayload

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

type CreateTemplateParams

type CreateTemplateParams struct {

	/*Body*/
	Body CreateTemplateBody

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

CreateTemplateParams contains all the parameters to send to the API endpoint for the create template operation typically these are written to a http.Request

func NewCreateTemplateParams

func NewCreateTemplateParams() *CreateTemplateParams

NewCreateTemplateParams creates a new CreateTemplateParams object with the default values initialized.

func NewCreateTemplateParamsWithContext

func NewCreateTemplateParamsWithContext(ctx context.Context) *CreateTemplateParams

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

func NewCreateTemplateParamsWithHTTPClient

func NewCreateTemplateParamsWithHTTPClient(client *http.Client) *CreateTemplateParams

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

func NewCreateTemplateParamsWithTimeout

func NewCreateTemplateParamsWithTimeout(timeout time.Duration) *CreateTemplateParams

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

func (*CreateTemplateParams) SetBody

func (o *CreateTemplateParams) SetBody(body CreateTemplateBody)

SetBody adds the body to the create template params

func (*CreateTemplateParams) SetContext

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

SetContext adds the context to the create template params

func (*CreateTemplateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create template params

func (*CreateTemplateParams) SetTimeout

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

SetTimeout adds the timeout to the create template params

func (*CreateTemplateParams) WithBody

WithBody adds the body to the create template params

func (*CreateTemplateParams) WithContext

WithContext adds the context to the create template params

func (*CreateTemplateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create template params

func (*CreateTemplateParams) WithTimeout

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

WithTimeout adds the timeout to the create template params

func (*CreateTemplateParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateTemplateReader

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

CreateTemplateReader is a Reader for the CreateTemplate structure.

func (*CreateTemplateReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type DeleteTemplateBody

type DeleteTemplateBody struct {

	// name
	Name string `json:"name,omitempty"`
}

DeleteTemplateBody delete template body swagger:model DeleteTemplateBody

func (*DeleteTemplateBody) MarshalBinary

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

MarshalBinary interface implementation

func (*DeleteTemplateBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*DeleteTemplateBody) Validate

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

Validate validates this delete template body

type DeleteTemplateDefault

type DeleteTemplateDefault struct {
	Payload *DeleteTemplateDefaultBody
	// contains filtered or unexported fields
}

DeleteTemplateDefault handles this case with default header values.

An unexpected error response.

func NewDeleteTemplateDefault

func NewDeleteTemplateDefault(code int) *DeleteTemplateDefault

NewDeleteTemplateDefault creates a DeleteTemplateDefault with default headers values

func (*DeleteTemplateDefault) Code

func (o *DeleteTemplateDefault) Code() int

Code gets the status code for the delete template default response

func (*DeleteTemplateDefault) Error

func (o *DeleteTemplateDefault) Error() string

func (*DeleteTemplateDefault) GetPayload

type DeleteTemplateDefaultBody

type DeleteTemplateDefaultBody struct {

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

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

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

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

DeleteTemplateDefaultBody delete template default body swagger:model DeleteTemplateDefaultBody

func (*DeleteTemplateDefaultBody) MarshalBinary

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

MarshalBinary interface implementation

func (*DeleteTemplateDefaultBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*DeleteTemplateDefaultBody) Validate

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

Validate validates this delete template default body

type DeleteTemplateOK

type DeleteTemplateOK struct {
	Payload interface{}
}

DeleteTemplateOK handles this case with default header values.

A successful response.

func NewDeleteTemplateOK

func NewDeleteTemplateOK() *DeleteTemplateOK

NewDeleteTemplateOK creates a DeleteTemplateOK with default headers values

func (*DeleteTemplateOK) Error

func (o *DeleteTemplateOK) Error() string

func (*DeleteTemplateOK) GetPayload

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

type DeleteTemplateParams

type DeleteTemplateParams struct {

	/*Body*/
	Body DeleteTemplateBody

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

DeleteTemplateParams contains all the parameters to send to the API endpoint for the delete template operation typically these are written to a http.Request

func NewDeleteTemplateParams

func NewDeleteTemplateParams() *DeleteTemplateParams

NewDeleteTemplateParams creates a new DeleteTemplateParams object with the default values initialized.

func NewDeleteTemplateParamsWithContext

func NewDeleteTemplateParamsWithContext(ctx context.Context) *DeleteTemplateParams

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

func NewDeleteTemplateParamsWithHTTPClient

func NewDeleteTemplateParamsWithHTTPClient(client *http.Client) *DeleteTemplateParams

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

func NewDeleteTemplateParamsWithTimeout

func NewDeleteTemplateParamsWithTimeout(timeout time.Duration) *DeleteTemplateParams

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

func (*DeleteTemplateParams) SetBody

func (o *DeleteTemplateParams) SetBody(body DeleteTemplateBody)

SetBody adds the body to the delete template params

func (*DeleteTemplateParams) SetContext

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

SetContext adds the context to the delete template params

func (*DeleteTemplateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the delete template params

func (*DeleteTemplateParams) SetTimeout

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

SetTimeout adds the timeout to the delete template params

func (*DeleteTemplateParams) WithBody

WithBody adds the body to the delete template params

func (*DeleteTemplateParams) WithContext

WithContext adds the context to the delete template params

func (*DeleteTemplateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the delete template params

func (*DeleteTemplateParams) WithTimeout

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

WithTimeout adds the timeout to the delete template params

func (*DeleteTemplateParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DeleteTemplateReader

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

DeleteTemplateReader is a Reader for the DeleteTemplate structure.

func (*DeleteTemplateReader) ReadResponse

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

ReadResponse reads a server response into the received o.

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 ListTemplatesBody

type ListTemplatesBody struct {

	// If true, template files will be re-read from disk.
	Reload bool `json:"reload,omitempty"`

	// page params
	PageParams *ListTemplatesParamsBodyPageParams `json:"page_params,omitempty"`
}

ListTemplatesBody list templates body swagger:model ListTemplatesBody

func (*ListTemplatesBody) MarshalBinary

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

MarshalBinary interface implementation

func (*ListTemplatesBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ListTemplatesBody) Validate

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

Validate validates this list templates body

type ListTemplatesDefault

type ListTemplatesDefault struct {
	Payload *ListTemplatesDefaultBody
	// contains filtered or unexported fields
}

ListTemplatesDefault handles this case with default header values.

An unexpected error response.

func NewListTemplatesDefault

func NewListTemplatesDefault(code int) *ListTemplatesDefault

NewListTemplatesDefault creates a ListTemplatesDefault with default headers values

func (*ListTemplatesDefault) Code

func (o *ListTemplatesDefault) Code() int

Code gets the status code for the list templates default response

func (*ListTemplatesDefault) Error

func (o *ListTemplatesDefault) Error() string

func (*ListTemplatesDefault) GetPayload

type ListTemplatesDefaultBody

type ListTemplatesDefaultBody struct {

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

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

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

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

ListTemplatesDefaultBody list templates default body swagger:model ListTemplatesDefaultBody

func (*ListTemplatesDefaultBody) MarshalBinary

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

MarshalBinary interface implementation

func (*ListTemplatesDefaultBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ListTemplatesDefaultBody) Validate

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

Validate validates this list templates default body

type ListTemplatesOK

type ListTemplatesOK struct {
	Payload *ListTemplatesOKBody
}

ListTemplatesOK handles this case with default header values.

A successful response.

func NewListTemplatesOK

func NewListTemplatesOK() *ListTemplatesOK

NewListTemplatesOK creates a ListTemplatesOK with default headers values

func (*ListTemplatesOK) Error

func (o *ListTemplatesOK) Error() string

func (*ListTemplatesOK) GetPayload

func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody

type ListTemplatesOKBody

type ListTemplatesOKBody struct {

	// templates
	Templates []*TemplatesItems0 `json:"templates"`

	// totals
	Totals *ListTemplatesOKBodyTotals `json:"totals,omitempty"`
}

ListTemplatesOKBody list templates OK body swagger:model ListTemplatesOKBody

func (*ListTemplatesOKBody) MarshalBinary

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

MarshalBinary interface implementation

func (*ListTemplatesOKBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ListTemplatesOKBody) Validate

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

Validate validates this list templates OK body

type ListTemplatesOKBodyTotals

type ListTemplatesOKBodyTotals struct {

	// Total number of results.
	TotalItems int32 `json:"total_items,omitempty"`

	// Total number of pages.
	TotalPages int32 `json:"total_pages,omitempty"`
}

ListTemplatesOKBodyTotals PageTotals represents total values for pagination. swagger:model ListTemplatesOKBodyTotals

func (*ListTemplatesOKBodyTotals) MarshalBinary

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

MarshalBinary interface implementation

func (*ListTemplatesOKBodyTotals) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ListTemplatesOKBodyTotals) Validate

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

Validate validates this list templates OK body totals

type ListTemplatesParams

type ListTemplatesParams struct {

	/*Body*/
	Body ListTemplatesBody

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

ListTemplatesParams contains all the parameters to send to the API endpoint for the list templates operation typically these are written to a http.Request

func NewListTemplatesParams

func NewListTemplatesParams() *ListTemplatesParams

NewListTemplatesParams creates a new ListTemplatesParams object with the default values initialized.

func NewListTemplatesParamsWithContext

func NewListTemplatesParamsWithContext(ctx context.Context) *ListTemplatesParams

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

func NewListTemplatesParamsWithHTTPClient

func NewListTemplatesParamsWithHTTPClient(client *http.Client) *ListTemplatesParams

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

func NewListTemplatesParamsWithTimeout

func NewListTemplatesParamsWithTimeout(timeout time.Duration) *ListTemplatesParams

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

func (*ListTemplatesParams) SetBody

func (o *ListTemplatesParams) SetBody(body ListTemplatesBody)

SetBody adds the body to the list templates params

func (*ListTemplatesParams) SetContext

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

SetContext adds the context to the list templates params

func (*ListTemplatesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list templates params

func (*ListTemplatesParams) SetTimeout

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

SetTimeout adds the timeout to the list templates params

func (*ListTemplatesParams) WithBody

WithBody adds the body to the list templates params

func (*ListTemplatesParams) WithContext

WithContext adds the context to the list templates params

func (*ListTemplatesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list templates params

func (*ListTemplatesParams) WithTimeout

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

WithTimeout adds the timeout to the list templates params

func (*ListTemplatesParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListTemplatesParamsBodyPageParams

type ListTemplatesParamsBodyPageParams struct {

	// Maximum number of results per page.
	PageSize int32 `json:"page_size,omitempty"`

	// Index of the requested page, starts from 0.
	Index int32 `json:"index,omitempty"`
}

ListTemplatesParamsBodyPageParams PageParams represents page request parameters for pagination. swagger:model ListTemplatesParamsBodyPageParams

func (*ListTemplatesParamsBodyPageParams) MarshalBinary

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

MarshalBinary interface implementation

func (*ListTemplatesParamsBodyPageParams) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ListTemplatesParamsBodyPageParams) Validate

Validate validates this list templates params body page params

type ListTemplatesReader

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

ListTemplatesReader is a Reader for the ListTemplates structure.

func (*ListTemplatesReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type TemplatesItems0

type TemplatesItems0 struct {

	// Machine-readable name (ID).
	Name string `json:"name,omitempty"`

	// Short human-readable summary.
	Summary string `json:"summary,omitempty"`

	// PromQL query expression with templating parameters.
	Expr string `json:"expr,omitempty"`

	// Query templating parameters.
	Params []*TemplatesItems0ParamsItems0 `json:"params"`

	// Default duration value.
	For string `json:"for,omitempty"`

	// Severity represents severity level of the check result or alert.
	// Enum: [SEVERITY_INVALID SEVERITY_EMERGENCY SEVERITY_ALERT SEVERITY_CRITICAL SEVERITY_ERROR SEVERITY_WARNING SEVERITY_NOTICE SEVERITY_INFO SEVERITY_DEBUG]
	Severity *string `json:"severity,omitempty"`

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

	// Annotations.
	Annotations map[string]string `json:"annotations,omitempty"`

	// TemplateSource defines template source.
	//
	//  - BUILT_IN: Template that is shipped with PMM Server releases.
	//  - SAAS: Template that is downloaded from check.percona.com.
	//  - USER_FILE: Templated loaded from user-suplied file.
	//  - USER_API: Templated created via API.
	// Enum: [TEMPLATE_SOURCE_INVALID BUILT_IN SAAS USER_FILE USER_API]
	Source *string `json:"source,omitempty"`

	// Template creation time. Empty for built-in and SaaS templates.
	// Format: date-time
	CreatedAt strfmt.DateTime `json:"created_at,omitempty"`

	// YAML (or JSON) template file content. Empty for built-in and SaaS templates.
	Yaml string `json:"yaml,omitempty"`
}

TemplatesItems0 Template represents Alert Template that is used to create Alert Rule. swagger:model TemplatesItems0

func (*TemplatesItems0) MarshalBinary

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

MarshalBinary interface implementation

func (*TemplatesItems0) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*TemplatesItems0) Validate

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

Validate validates this templates items0

type TemplatesItems0ParamsItems0

type TemplatesItems0ParamsItems0 struct {

	// Machine-readable name (ID) that is used in expression.
	Name string `json:"name,omitempty"`

	// Short human-readable parameter summary.
	Summary string `json:"summary,omitempty"`

	// ParamUnit represents template parameter unit.
	//
	//  - PARAM_UNIT_INVALID: Invalid, unknown or absent.
	//  - PERCENTAGE: %
	//  - SECONDS: s
	// Enum: [PARAM_UNIT_INVALID PERCENTAGE SECONDS]
	Unit *string `json:"unit,omitempty"`

	// ParamType represents template parameter type.
	// Enum: [PARAM_TYPE_INVALID BOOL FLOAT STRING]
	Type *string `json:"type,omitempty"`

	// bool
	Bool *TemplatesItems0ParamsItems0Bool `json:"bool,omitempty"`

	// float
	Float *TemplatesItems0ParamsItems0Float `json:"float,omitempty"`

	// string
	String *TemplatesItems0ParamsItems0String `json:"string,omitempty"`
}

TemplatesItems0ParamsItems0 TemplateParam represents a single template parameter. swagger:model TemplatesItems0ParamsItems0

func (*TemplatesItems0ParamsItems0) MarshalBinary

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

MarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0) Validate

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

Validate validates this templates items0 params items0

type TemplatesItems0ParamsItems0Bool

type TemplatesItems0ParamsItems0Bool struct {

	// BooleanFlag represent a command to set some boolean property to true,
	// to false, or avoid changing that property.
	//
	//  - DO_NOT_CHANGE: Do not change boolean property. Default value.
	//  - TRUE: True.
	//  - FALSE: False.
	// Enum: [DO_NOT_CHANGE TRUE FALSE]
	Default *string `json:"default,omitempty"`
}

TemplatesItems0ParamsItems0Bool TemplateBoolParam represents boolean parameter's default value. swagger:model TemplatesItems0ParamsItems0Bool

func (*TemplatesItems0ParamsItems0Bool) MarshalBinary

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

MarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0Bool) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0Bool) Validate

Validate validates this templates items0 params items0 bool

type TemplatesItems0ParamsItems0Float

type TemplatesItems0ParamsItems0Float struct {

	// True if default value is set.
	HasDefault bool `json:"has_default,omitempty"`

	// Default value if has_default is true.
	Default float32 `json:"default,omitempty"`

	// True if minimal valid value is set.
	HasMin bool `json:"has_min,omitempty"`

	// Minimal valid value (inclusive) if has_min is true.
	Min float32 `json:"min,omitempty"`

	// True if maximal valid value is set.
	HasMax bool `json:"has_max,omitempty"`

	// Maximal valid value (inclusive) if has_max is true.
	Max float32 `json:"max,omitempty"`
}

TemplatesItems0ParamsItems0Float TemplateFloatParam represents float parameter's default value and valid range. swagger:model TemplatesItems0ParamsItems0Float

func (*TemplatesItems0ParamsItems0Float) MarshalBinary

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

MarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0Float) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0Float) Validate

Validate validates this templates items0 params items0 float

type TemplatesItems0ParamsItems0String

type TemplatesItems0ParamsItems0String struct {

	// True if default value is set.
	HasDefault bool `json:"has_default,omitempty"`

	// Default value if has_default is true.
	Default string `json:"default,omitempty"`
}

TemplatesItems0ParamsItems0String TemplateStringParam represents string parameter's default value. swagger:model TemplatesItems0ParamsItems0String

func (*TemplatesItems0ParamsItems0String) MarshalBinary

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

MarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0String) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*TemplatesItems0ParamsItems0String) Validate

Validate validates this templates items0 params items0 string

type UpdateTemplateBody

type UpdateTemplateBody struct {

	// Machine-readable name (ID).
	Name string `json:"name,omitempty"`

	// YAML (or JSON) template file content.
	Yaml string `json:"yaml,omitempty"`
}

UpdateTemplateBody update template body swagger:model UpdateTemplateBody

func (*UpdateTemplateBody) MarshalBinary

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

MarshalBinary interface implementation

func (*UpdateTemplateBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*UpdateTemplateBody) Validate

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

Validate validates this update template body

type UpdateTemplateDefault

type UpdateTemplateDefault struct {
	Payload *UpdateTemplateDefaultBody
	// contains filtered or unexported fields
}

UpdateTemplateDefault handles this case with default header values.

An unexpected error response.

func NewUpdateTemplateDefault

func NewUpdateTemplateDefault(code int) *UpdateTemplateDefault

NewUpdateTemplateDefault creates a UpdateTemplateDefault with default headers values

func (*UpdateTemplateDefault) Code

func (o *UpdateTemplateDefault) Code() int

Code gets the status code for the update template default response

func (*UpdateTemplateDefault) Error

func (o *UpdateTemplateDefault) Error() string

func (*UpdateTemplateDefault) GetPayload

type UpdateTemplateDefaultBody

type UpdateTemplateDefaultBody struct {

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

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

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

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

UpdateTemplateDefaultBody update template default body swagger:model UpdateTemplateDefaultBody

func (*UpdateTemplateDefaultBody) MarshalBinary

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

MarshalBinary interface implementation

func (*UpdateTemplateDefaultBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*UpdateTemplateDefaultBody) Validate

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

Validate validates this update template default body

type UpdateTemplateOK

type UpdateTemplateOK struct {
	Payload interface{}
}

UpdateTemplateOK handles this case with default header values.

A successful response.

func NewUpdateTemplateOK

func NewUpdateTemplateOK() *UpdateTemplateOK

NewUpdateTemplateOK creates a UpdateTemplateOK with default headers values

func (*UpdateTemplateOK) Error

func (o *UpdateTemplateOK) Error() string

func (*UpdateTemplateOK) GetPayload

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

type UpdateTemplateParams

type UpdateTemplateParams struct {

	/*Body*/
	Body UpdateTemplateBody

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

UpdateTemplateParams contains all the parameters to send to the API endpoint for the update template operation typically these are written to a http.Request

func NewUpdateTemplateParams

func NewUpdateTemplateParams() *UpdateTemplateParams

NewUpdateTemplateParams creates a new UpdateTemplateParams object with the default values initialized.

func NewUpdateTemplateParamsWithContext

func NewUpdateTemplateParamsWithContext(ctx context.Context) *UpdateTemplateParams

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

func NewUpdateTemplateParamsWithHTTPClient

func NewUpdateTemplateParamsWithHTTPClient(client *http.Client) *UpdateTemplateParams

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

func NewUpdateTemplateParamsWithTimeout

func NewUpdateTemplateParamsWithTimeout(timeout time.Duration) *UpdateTemplateParams

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

func (*UpdateTemplateParams) SetBody

func (o *UpdateTemplateParams) SetBody(body UpdateTemplateBody)

SetBody adds the body to the update template params

func (*UpdateTemplateParams) SetContext

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

SetContext adds the context to the update template params

func (*UpdateTemplateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the update template params

func (*UpdateTemplateParams) SetTimeout

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

SetTimeout adds the timeout to the update template params

func (*UpdateTemplateParams) WithBody

WithBody adds the body to the update template params

func (*UpdateTemplateParams) WithContext

WithContext adds the context to the update template params

func (*UpdateTemplateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the update template params

func (*UpdateTemplateParams) WithTimeout

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

WithTimeout adds the timeout to the update template params

func (*UpdateTemplateParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type UpdateTemplateReader

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

UpdateTemplateReader is a Reader for the UpdateTemplate structure.

func (*UpdateTemplateReader) ReadResponse

func (o *UpdateTemplateReader) 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