alert

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: GPL-3.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 alert API

func (*Client) GetAlerts

func (a *Client) GetAlerts(params *GetAlertsParams, opts ...ClientOption) (*GetAlertsOK, error)

GetAlerts Get a list of alerts

func (*Client) PostAlerts

func (a *Client) PostAlerts(params *PostAlertsParams, opts ...ClientOption) (*PostAlertsOK, error)

PostAlerts Create new Alerts

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

type ClientService

type ClientService interface {
	GetAlerts(params *GetAlertsParams, opts ...ClientOption) (*GetAlertsOK, error)

	PostAlerts(params *PostAlertsParams, opts ...ClientOption) (*PostAlertsOK, 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 alert API client.

type GetAlertsBadRequest

type GetAlertsBadRequest struct {
	Payload string
}

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

Bad request

func NewGetAlertsBadRequest

func NewGetAlertsBadRequest() *GetAlertsBadRequest

NewGetAlertsBadRequest creates a GetAlertsBadRequest with default headers values

func (*GetAlertsBadRequest) Code

func (o *GetAlertsBadRequest) Code() int

Code gets the status code for the get alerts bad request response

func (*GetAlertsBadRequest) Error

func (o *GetAlertsBadRequest) Error() string

func (*GetAlertsBadRequest) GetPayload

func (o *GetAlertsBadRequest) GetPayload() string

func (*GetAlertsBadRequest) IsClientError

func (o *GetAlertsBadRequest) IsClientError() bool

IsClientError returns true when this get alerts bad request response has a 4xx status code

func (*GetAlertsBadRequest) IsCode

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

IsCode returns true when this get alerts bad request response a status code equal to that given

func (*GetAlertsBadRequest) IsRedirect

func (o *GetAlertsBadRequest) IsRedirect() bool

IsRedirect returns true when this get alerts bad request response has a 3xx status code

func (*GetAlertsBadRequest) IsServerError

func (o *GetAlertsBadRequest) IsServerError() bool

IsServerError returns true when this get alerts bad request response has a 5xx status code

func (*GetAlertsBadRequest) IsSuccess

func (o *GetAlertsBadRequest) IsSuccess() bool

IsSuccess returns true when this get alerts bad request response has a 2xx status code

func (*GetAlertsBadRequest) String

func (o *GetAlertsBadRequest) String() string

type GetAlertsInternalServerError

type GetAlertsInternalServerError struct {
	Payload string
}

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

Internal server error

func NewGetAlertsInternalServerError

func NewGetAlertsInternalServerError() *GetAlertsInternalServerError

NewGetAlertsInternalServerError creates a GetAlertsInternalServerError with default headers values

func (*GetAlertsInternalServerError) Code

Code gets the status code for the get alerts internal server error response

func (*GetAlertsInternalServerError) Error

func (*GetAlertsInternalServerError) GetPayload

func (o *GetAlertsInternalServerError) GetPayload() string

func (*GetAlertsInternalServerError) IsClientError

func (o *GetAlertsInternalServerError) IsClientError() bool

IsClientError returns true when this get alerts internal server error response has a 4xx status code

func (*GetAlertsInternalServerError) IsCode

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

IsCode returns true when this get alerts internal server error response a status code equal to that given

func (*GetAlertsInternalServerError) IsRedirect

func (o *GetAlertsInternalServerError) IsRedirect() bool

IsRedirect returns true when this get alerts internal server error response has a 3xx status code

func (*GetAlertsInternalServerError) IsServerError

func (o *GetAlertsInternalServerError) IsServerError() bool

IsServerError returns true when this get alerts internal server error response has a 5xx status code

func (*GetAlertsInternalServerError) IsSuccess

func (o *GetAlertsInternalServerError) IsSuccess() bool

IsSuccess returns true when this get alerts internal server error response has a 2xx status code

func (*GetAlertsInternalServerError) String

type GetAlertsOK

type GetAlertsOK struct {
	Payload models.GettableAlerts
}

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

Get alerts response

func NewGetAlertsOK

func NewGetAlertsOK() *GetAlertsOK

NewGetAlertsOK creates a GetAlertsOK with default headers values

func (*GetAlertsOK) Code

func (o *GetAlertsOK) Code() int

Code gets the status code for the get alerts o k response

func (*GetAlertsOK) Error

func (o *GetAlertsOK) Error() string

func (*GetAlertsOK) GetPayload

func (o *GetAlertsOK) GetPayload() models.GettableAlerts

func (*GetAlertsOK) IsClientError

func (o *GetAlertsOK) IsClientError() bool

IsClientError returns true when this get alerts o k response has a 4xx status code

func (*GetAlertsOK) IsCode

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

IsCode returns true when this get alerts o k response a status code equal to that given

func (*GetAlertsOK) IsRedirect

func (o *GetAlertsOK) IsRedirect() bool

IsRedirect returns true when this get alerts o k response has a 3xx status code

func (*GetAlertsOK) IsServerError

func (o *GetAlertsOK) IsServerError() bool

IsServerError returns true when this get alerts o k response has a 5xx status code

func (*GetAlertsOK) IsSuccess

func (o *GetAlertsOK) IsSuccess() bool

IsSuccess returns true when this get alerts o k response has a 2xx status code

func (*GetAlertsOK) String

func (o *GetAlertsOK) String() string

type GetAlertsParams

type GetAlertsParams struct {

	/* Active.

	   Show active alerts

	   Default: true
	*/
	Active *bool

	/* Filter.

	   A list of matchers to filter alerts by
	*/
	Filter []string

	/* Inhibited.

	   Show inhibited alerts

	   Default: true
	*/
	Inhibited *bool

	/* Receiver.

	   A regex matching receivers to filter alerts by
	*/
	Receiver *string

	/* Silenced.

	   Show silenced alerts

	   Default: true
	*/
	Silenced *bool

	/* Unprocessed.

	   Show unprocessed alerts

	   Default: true
	*/
	Unprocessed *bool

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

GetAlertsParams contains all the parameters to send to the API endpoint

for the get alerts operation.

Typically these are written to a http.Request.

func NewGetAlertsParams

func NewGetAlertsParams() *GetAlertsParams

NewGetAlertsParams creates a new GetAlertsParams 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 NewGetAlertsParamsWithContext

func NewGetAlertsParamsWithContext(ctx context.Context) *GetAlertsParams

NewGetAlertsParamsWithContext creates a new GetAlertsParams object with the ability to set a context for a request.

func NewGetAlertsParamsWithHTTPClient

func NewGetAlertsParamsWithHTTPClient(client *http.Client) *GetAlertsParams

NewGetAlertsParamsWithHTTPClient creates a new GetAlertsParams object with the ability to set a custom HTTPClient for a request.

func NewGetAlertsParamsWithTimeout

func NewGetAlertsParamsWithTimeout(timeout time.Duration) *GetAlertsParams

NewGetAlertsParamsWithTimeout creates a new GetAlertsParams object with the ability to set a timeout on a request.

func (*GetAlertsParams) SetActive

func (o *GetAlertsParams) SetActive(active *bool)

SetActive adds the active to the get alerts params

func (*GetAlertsParams) SetContext

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

SetContext adds the context to the get alerts params

func (*GetAlertsParams) SetDefaults

func (o *GetAlertsParams) SetDefaults()

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

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

func (*GetAlertsParams) SetFilter

func (o *GetAlertsParams) SetFilter(filter []string)

SetFilter adds the filter to the get alerts params

func (*GetAlertsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get alerts params

func (*GetAlertsParams) SetInhibited

func (o *GetAlertsParams) SetInhibited(inhibited *bool)

SetInhibited adds the inhibited to the get alerts params

func (*GetAlertsParams) SetReceiver

func (o *GetAlertsParams) SetReceiver(receiver *string)

SetReceiver adds the receiver to the get alerts params

func (*GetAlertsParams) SetSilenced

func (o *GetAlertsParams) SetSilenced(silenced *bool)

SetSilenced adds the silenced to the get alerts params

func (*GetAlertsParams) SetTimeout

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

SetTimeout adds the timeout to the get alerts params

func (*GetAlertsParams) SetUnprocessed

func (o *GetAlertsParams) SetUnprocessed(unprocessed *bool)

SetUnprocessed adds the unprocessed to the get alerts params

func (*GetAlertsParams) WithActive

func (o *GetAlertsParams) WithActive(active *bool) *GetAlertsParams

WithActive adds the active to the get alerts params

func (*GetAlertsParams) WithContext

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

WithContext adds the context to the get alerts params

func (*GetAlertsParams) WithDefaults

func (o *GetAlertsParams) WithDefaults() *GetAlertsParams

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

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

func (*GetAlertsParams) WithFilter

func (o *GetAlertsParams) WithFilter(filter []string) *GetAlertsParams

WithFilter adds the filter to the get alerts params

func (*GetAlertsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get alerts params

func (*GetAlertsParams) WithInhibited

func (o *GetAlertsParams) WithInhibited(inhibited *bool) *GetAlertsParams

WithInhibited adds the inhibited to the get alerts params

func (*GetAlertsParams) WithReceiver

func (o *GetAlertsParams) WithReceiver(receiver *string) *GetAlertsParams

WithReceiver adds the receiver to the get alerts params

func (*GetAlertsParams) WithSilenced

func (o *GetAlertsParams) WithSilenced(silenced *bool) *GetAlertsParams

WithSilenced adds the silenced to the get alerts params

func (*GetAlertsParams) WithTimeout

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

WithTimeout adds the timeout to the get alerts params

func (*GetAlertsParams) WithUnprocessed

func (o *GetAlertsParams) WithUnprocessed(unprocessed *bool) *GetAlertsParams

WithUnprocessed adds the unprocessed to the get alerts params

func (*GetAlertsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetAlertsReader

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

GetAlertsReader is a Reader for the GetAlerts structure.

func (*GetAlertsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostAlertsBadRequest

type PostAlertsBadRequest struct {
	Payload string
}

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

Bad request

func NewPostAlertsBadRequest

func NewPostAlertsBadRequest() *PostAlertsBadRequest

NewPostAlertsBadRequest creates a PostAlertsBadRequest with default headers values

func (*PostAlertsBadRequest) Code

func (o *PostAlertsBadRequest) Code() int

Code gets the status code for the post alerts bad request response

func (*PostAlertsBadRequest) Error

func (o *PostAlertsBadRequest) Error() string

func (*PostAlertsBadRequest) GetPayload

func (o *PostAlertsBadRequest) GetPayload() string

func (*PostAlertsBadRequest) IsClientError

func (o *PostAlertsBadRequest) IsClientError() bool

IsClientError returns true when this post alerts bad request response has a 4xx status code

func (*PostAlertsBadRequest) IsCode

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

IsCode returns true when this post alerts bad request response a status code equal to that given

func (*PostAlertsBadRequest) IsRedirect

func (o *PostAlertsBadRequest) IsRedirect() bool

IsRedirect returns true when this post alerts bad request response has a 3xx status code

func (*PostAlertsBadRequest) IsServerError

func (o *PostAlertsBadRequest) IsServerError() bool

IsServerError returns true when this post alerts bad request response has a 5xx status code

func (*PostAlertsBadRequest) IsSuccess

func (o *PostAlertsBadRequest) IsSuccess() bool

IsSuccess returns true when this post alerts bad request response has a 2xx status code

func (*PostAlertsBadRequest) String

func (o *PostAlertsBadRequest) String() string

type PostAlertsInternalServerError

type PostAlertsInternalServerError struct {
	Payload string
}

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

Internal server error

func NewPostAlertsInternalServerError

func NewPostAlertsInternalServerError() *PostAlertsInternalServerError

NewPostAlertsInternalServerError creates a PostAlertsInternalServerError with default headers values

func (*PostAlertsInternalServerError) Code

Code gets the status code for the post alerts internal server error response

func (*PostAlertsInternalServerError) Error

func (*PostAlertsInternalServerError) GetPayload

func (o *PostAlertsInternalServerError) GetPayload() string

func (*PostAlertsInternalServerError) IsClientError

func (o *PostAlertsInternalServerError) IsClientError() bool

IsClientError returns true when this post alerts internal server error response has a 4xx status code

func (*PostAlertsInternalServerError) IsCode

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

IsCode returns true when this post alerts internal server error response a status code equal to that given

func (*PostAlertsInternalServerError) IsRedirect

func (o *PostAlertsInternalServerError) IsRedirect() bool

IsRedirect returns true when this post alerts internal server error response has a 3xx status code

func (*PostAlertsInternalServerError) IsServerError

func (o *PostAlertsInternalServerError) IsServerError() bool

IsServerError returns true when this post alerts internal server error response has a 5xx status code

func (*PostAlertsInternalServerError) IsSuccess

func (o *PostAlertsInternalServerError) IsSuccess() bool

IsSuccess returns true when this post alerts internal server error response has a 2xx status code

func (*PostAlertsInternalServerError) String

type PostAlertsOK

type PostAlertsOK struct {
}

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

Create alerts response

func NewPostAlertsOK

func NewPostAlertsOK() *PostAlertsOK

NewPostAlertsOK creates a PostAlertsOK with default headers values

func (*PostAlertsOK) Code

func (o *PostAlertsOK) Code() int

Code gets the status code for the post alerts o k response

func (*PostAlertsOK) Error

func (o *PostAlertsOK) Error() string

func (*PostAlertsOK) IsClientError

func (o *PostAlertsOK) IsClientError() bool

IsClientError returns true when this post alerts o k response has a 4xx status code

func (*PostAlertsOK) IsCode

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

IsCode returns true when this post alerts o k response a status code equal to that given

func (*PostAlertsOK) IsRedirect

func (o *PostAlertsOK) IsRedirect() bool

IsRedirect returns true when this post alerts o k response has a 3xx status code

func (*PostAlertsOK) IsServerError

func (o *PostAlertsOK) IsServerError() bool

IsServerError returns true when this post alerts o k response has a 5xx status code

func (*PostAlertsOK) IsSuccess

func (o *PostAlertsOK) IsSuccess() bool

IsSuccess returns true when this post alerts o k response has a 2xx status code

func (*PostAlertsOK) String

func (o *PostAlertsOK) String() string

type PostAlertsParams

type PostAlertsParams struct {

	/* Alerts.

	   The alerts to create
	*/
	Alerts models.PostableAlerts

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

PostAlertsParams contains all the parameters to send to the API endpoint

for the post alerts operation.

Typically these are written to a http.Request.

func NewPostAlertsParams

func NewPostAlertsParams() *PostAlertsParams

NewPostAlertsParams creates a new PostAlertsParams 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 NewPostAlertsParamsWithContext

func NewPostAlertsParamsWithContext(ctx context.Context) *PostAlertsParams

NewPostAlertsParamsWithContext creates a new PostAlertsParams object with the ability to set a context for a request.

func NewPostAlertsParamsWithHTTPClient

func NewPostAlertsParamsWithHTTPClient(client *http.Client) *PostAlertsParams

NewPostAlertsParamsWithHTTPClient creates a new PostAlertsParams object with the ability to set a custom HTTPClient for a request.

func NewPostAlertsParamsWithTimeout

func NewPostAlertsParamsWithTimeout(timeout time.Duration) *PostAlertsParams

NewPostAlertsParamsWithTimeout creates a new PostAlertsParams object with the ability to set a timeout on a request.

func (*PostAlertsParams) SetAlerts

func (o *PostAlertsParams) SetAlerts(alerts models.PostableAlerts)

SetAlerts adds the alerts to the post alerts params

func (*PostAlertsParams) SetContext

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

SetContext adds the context to the post alerts params

func (*PostAlertsParams) SetDefaults

func (o *PostAlertsParams) SetDefaults()

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

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

func (*PostAlertsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post alerts params

func (*PostAlertsParams) SetTimeout

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

SetTimeout adds the timeout to the post alerts params

func (*PostAlertsParams) WithAlerts

func (o *PostAlertsParams) WithAlerts(alerts models.PostableAlerts) *PostAlertsParams

WithAlerts adds the alerts to the post alerts params

func (*PostAlertsParams) WithContext

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

WithContext adds the context to the post alerts params

func (*PostAlertsParams) WithDefaults

func (o *PostAlertsParams) WithDefaults() *PostAlertsParams

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

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

func (*PostAlertsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the post alerts params

func (*PostAlertsParams) WithTimeout

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

WithTimeout adds the timeout to the post alerts params

func (*PostAlertsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostAlertsReader

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

PostAlertsReader is a Reader for the PostAlerts structure.

func (*PostAlertsReader) ReadResponse

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