silence

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 11 Imported by: 32

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

func (*Client) DeleteSilence

func (a *Client) DeleteSilence(params *DeleteSilenceParams, opts ...ClientOption) (*DeleteSilenceOK, error)

DeleteSilence Delete a silence by its ID

func (*Client) GetSilence

func (a *Client) GetSilence(params *GetSilenceParams, opts ...ClientOption) (*GetSilenceOK, error)

GetSilence Get a silence by its ID

func (*Client) GetSilences

func (a *Client) GetSilences(params *GetSilencesParams, opts ...ClientOption) (*GetSilencesOK, error)

GetSilences Get a list of silences

func (*Client) PostSilences

func (a *Client) PostSilences(params *PostSilencesParams, opts ...ClientOption) (*PostSilencesOK, error)

PostSilences Post a new silence or update an existing one

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption added in v0.25.0

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService added in v0.22.0

type ClientService interface {
	DeleteSilence(params *DeleteSilenceParams, opts ...ClientOption) (*DeleteSilenceOK, error)

	GetSilence(params *GetSilenceParams, opts ...ClientOption) (*GetSilenceOK, error)

	GetSilences(params *GetSilencesParams, opts ...ClientOption) (*GetSilencesOK, error)

	PostSilences(params *PostSilencesParams, opts ...ClientOption) (*PostSilencesOK, 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 silence API client.

type DeleteSilenceInternalServerError

type DeleteSilenceInternalServerError struct {
	Payload string
}

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

Internal server error

func NewDeleteSilenceInternalServerError

func NewDeleteSilenceInternalServerError() *DeleteSilenceInternalServerError

NewDeleteSilenceInternalServerError creates a DeleteSilenceInternalServerError with default headers values

func (*DeleteSilenceInternalServerError) Error

func (*DeleteSilenceInternalServerError) GetPayload added in v0.20.0

func (o *DeleteSilenceInternalServerError) GetPayload() string

func (*DeleteSilenceInternalServerError) IsClientError added in v0.25.0

func (o *DeleteSilenceInternalServerError) IsClientError() bool

IsClientError returns true when this delete silence internal server error response has a 4xx status code

func (*DeleteSilenceInternalServerError) IsCode added in v0.25.0

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

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

func (*DeleteSilenceInternalServerError) IsRedirect added in v0.25.0

func (o *DeleteSilenceInternalServerError) IsRedirect() bool

IsRedirect returns true when this delete silence internal server error response has a 3xx status code

func (*DeleteSilenceInternalServerError) IsServerError added in v0.25.0

func (o *DeleteSilenceInternalServerError) IsServerError() bool

IsServerError returns true when this delete silence internal server error response has a 5xx status code

func (*DeleteSilenceInternalServerError) IsSuccess added in v0.25.0

func (o *DeleteSilenceInternalServerError) IsSuccess() bool

IsSuccess returns true when this delete silence internal server error response has a 2xx status code

func (*DeleteSilenceInternalServerError) String added in v0.25.0

type DeleteSilenceOK

type DeleteSilenceOK struct {
}

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

Delete silence response

func NewDeleteSilenceOK

func NewDeleteSilenceOK() *DeleteSilenceOK

NewDeleteSilenceOK creates a DeleteSilenceOK with default headers values

func (*DeleteSilenceOK) Error

func (o *DeleteSilenceOK) Error() string

func (*DeleteSilenceOK) IsClientError added in v0.25.0

func (o *DeleteSilenceOK) IsClientError() bool

IsClientError returns true when this delete silence o k response has a 4xx status code

func (*DeleteSilenceOK) IsCode added in v0.25.0

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

IsCode returns true when this delete silence o k response a status code equal to that given

func (*DeleteSilenceOK) IsRedirect added in v0.25.0

func (o *DeleteSilenceOK) IsRedirect() bool

IsRedirect returns true when this delete silence o k response has a 3xx status code

func (*DeleteSilenceOK) IsServerError added in v0.25.0

func (o *DeleteSilenceOK) IsServerError() bool

IsServerError returns true when this delete silence o k response has a 5xx status code

func (*DeleteSilenceOK) IsSuccess added in v0.25.0

func (o *DeleteSilenceOK) IsSuccess() bool

IsSuccess returns true when this delete silence o k response has a 2xx status code

func (*DeleteSilenceOK) String added in v0.25.0

func (o *DeleteSilenceOK) String() string

type DeleteSilenceParams

type DeleteSilenceParams struct {

	/* SilenceID.

	   ID of the silence to get

	   Format: uuid
	*/
	SilenceID strfmt.UUID

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

DeleteSilenceParams contains all the parameters to send to the API endpoint

for the delete silence operation.

Typically these are written to a http.Request.

func NewDeleteSilenceParams

func NewDeleteSilenceParams() *DeleteSilenceParams

NewDeleteSilenceParams creates a new DeleteSilenceParams 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 NewDeleteSilenceParamsWithContext

func NewDeleteSilenceParamsWithContext(ctx context.Context) *DeleteSilenceParams

NewDeleteSilenceParamsWithContext creates a new DeleteSilenceParams object with the ability to set a context for a request.

func NewDeleteSilenceParamsWithHTTPClient

func NewDeleteSilenceParamsWithHTTPClient(client *http.Client) *DeleteSilenceParams

NewDeleteSilenceParamsWithHTTPClient creates a new DeleteSilenceParams object with the ability to set a custom HTTPClient for a request.

func NewDeleteSilenceParamsWithTimeout

func NewDeleteSilenceParamsWithTimeout(timeout time.Duration) *DeleteSilenceParams

NewDeleteSilenceParamsWithTimeout creates a new DeleteSilenceParams object with the ability to set a timeout on a request.

func (*DeleteSilenceParams) SetContext

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

SetContext adds the context to the delete silence params

func (*DeleteSilenceParams) SetDefaults added in v0.25.0

func (o *DeleteSilenceParams) SetDefaults()

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

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

func (*DeleteSilenceParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the delete silence params

func (*DeleteSilenceParams) SetSilenceID

func (o *DeleteSilenceParams) SetSilenceID(silenceID strfmt.UUID)

SetSilenceID adds the silenceId to the delete silence params

func (*DeleteSilenceParams) SetTimeout

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

SetTimeout adds the timeout to the delete silence params

func (*DeleteSilenceParams) WithContext

WithContext adds the context to the delete silence params

func (*DeleteSilenceParams) WithDefaults added in v0.25.0

func (o *DeleteSilenceParams) WithDefaults() *DeleteSilenceParams

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

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

func (*DeleteSilenceParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the delete silence params

func (*DeleteSilenceParams) WithSilenceID

func (o *DeleteSilenceParams) WithSilenceID(silenceID strfmt.UUID) *DeleteSilenceParams

WithSilenceID adds the silenceID to the delete silence params

func (*DeleteSilenceParams) WithTimeout

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

WithTimeout adds the timeout to the delete silence params

func (*DeleteSilenceParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DeleteSilenceReader

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

DeleteSilenceReader is a Reader for the DeleteSilence structure.

func (*DeleteSilenceReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetSilenceInternalServerError

type GetSilenceInternalServerError struct {
	Payload string
}

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

Internal server error

func NewGetSilenceInternalServerError

func NewGetSilenceInternalServerError() *GetSilenceInternalServerError

NewGetSilenceInternalServerError creates a GetSilenceInternalServerError with default headers values

func (*GetSilenceInternalServerError) Error

func (*GetSilenceInternalServerError) GetPayload added in v0.20.0

func (o *GetSilenceInternalServerError) GetPayload() string

func (*GetSilenceInternalServerError) IsClientError added in v0.25.0

func (o *GetSilenceInternalServerError) IsClientError() bool

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

func (*GetSilenceInternalServerError) IsCode added in v0.25.0

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

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

func (*GetSilenceInternalServerError) IsRedirect added in v0.25.0

func (o *GetSilenceInternalServerError) IsRedirect() bool

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

func (*GetSilenceInternalServerError) IsServerError added in v0.25.0

func (o *GetSilenceInternalServerError) IsServerError() bool

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

func (*GetSilenceInternalServerError) IsSuccess added in v0.25.0

func (o *GetSilenceInternalServerError) IsSuccess() bool

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

func (*GetSilenceInternalServerError) String added in v0.25.0

type GetSilenceNotFound

type GetSilenceNotFound struct {
}

GetSilenceNotFound describes a response with status code 404, with default header values.

A silence with the specified ID was not found

func NewGetSilenceNotFound

func NewGetSilenceNotFound() *GetSilenceNotFound

NewGetSilenceNotFound creates a GetSilenceNotFound with default headers values

func (*GetSilenceNotFound) Error

func (o *GetSilenceNotFound) Error() string

func (*GetSilenceNotFound) IsClientError added in v0.25.0

func (o *GetSilenceNotFound) IsClientError() bool

IsClientError returns true when this get silence not found response has a 4xx status code

func (*GetSilenceNotFound) IsCode added in v0.25.0

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

IsCode returns true when this get silence not found response a status code equal to that given

func (*GetSilenceNotFound) IsRedirect added in v0.25.0

func (o *GetSilenceNotFound) IsRedirect() bool

IsRedirect returns true when this get silence not found response has a 3xx status code

func (*GetSilenceNotFound) IsServerError added in v0.25.0

func (o *GetSilenceNotFound) IsServerError() bool

IsServerError returns true when this get silence not found response has a 5xx status code

func (*GetSilenceNotFound) IsSuccess added in v0.25.0

func (o *GetSilenceNotFound) IsSuccess() bool

IsSuccess returns true when this get silence not found response has a 2xx status code

func (*GetSilenceNotFound) String added in v0.25.0

func (o *GetSilenceNotFound) String() string

type GetSilenceOK

type GetSilenceOK struct {
	Payload *models.GettableSilence
}

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

Get silence response

func NewGetSilenceOK

func NewGetSilenceOK() *GetSilenceOK

NewGetSilenceOK creates a GetSilenceOK with default headers values

func (*GetSilenceOK) Error

func (o *GetSilenceOK) Error() string

func (*GetSilenceOK) GetPayload added in v0.20.0

func (o *GetSilenceOK) GetPayload() *models.GettableSilence

func (*GetSilenceOK) IsClientError added in v0.25.0

func (o *GetSilenceOK) IsClientError() bool

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

func (*GetSilenceOK) IsCode added in v0.25.0

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

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

func (*GetSilenceOK) IsRedirect added in v0.25.0

func (o *GetSilenceOK) IsRedirect() bool

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

func (*GetSilenceOK) IsServerError added in v0.25.0

func (o *GetSilenceOK) IsServerError() bool

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

func (*GetSilenceOK) IsSuccess added in v0.25.0

func (o *GetSilenceOK) IsSuccess() bool

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

func (*GetSilenceOK) String added in v0.25.0

func (o *GetSilenceOK) String() string

type GetSilenceParams

type GetSilenceParams struct {

	/* SilenceID.

	   ID of the silence to get

	   Format: uuid
	*/
	SilenceID strfmt.UUID

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

GetSilenceParams contains all the parameters to send to the API endpoint

for the get silence operation.

Typically these are written to a http.Request.

func NewGetSilenceParams

func NewGetSilenceParams() *GetSilenceParams

NewGetSilenceParams creates a new GetSilenceParams 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 NewGetSilenceParamsWithContext

func NewGetSilenceParamsWithContext(ctx context.Context) *GetSilenceParams

NewGetSilenceParamsWithContext creates a new GetSilenceParams object with the ability to set a context for a request.

func NewGetSilenceParamsWithHTTPClient

func NewGetSilenceParamsWithHTTPClient(client *http.Client) *GetSilenceParams

NewGetSilenceParamsWithHTTPClient creates a new GetSilenceParams object with the ability to set a custom HTTPClient for a request.

func NewGetSilenceParamsWithTimeout

func NewGetSilenceParamsWithTimeout(timeout time.Duration) *GetSilenceParams

NewGetSilenceParamsWithTimeout creates a new GetSilenceParams object with the ability to set a timeout on a request.

func (*GetSilenceParams) SetContext

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

SetContext adds the context to the get silence params

func (*GetSilenceParams) SetDefaults added in v0.25.0

func (o *GetSilenceParams) SetDefaults()

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

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

func (*GetSilenceParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get silence params

func (*GetSilenceParams) SetSilenceID

func (o *GetSilenceParams) SetSilenceID(silenceID strfmt.UUID)

SetSilenceID adds the silenceId to the get silence params

func (*GetSilenceParams) SetTimeout

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

SetTimeout adds the timeout to the get silence params

func (*GetSilenceParams) WithContext

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

WithContext adds the context to the get silence params

func (*GetSilenceParams) WithDefaults added in v0.25.0

func (o *GetSilenceParams) WithDefaults() *GetSilenceParams

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

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

func (*GetSilenceParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get silence params

func (*GetSilenceParams) WithSilenceID

func (o *GetSilenceParams) WithSilenceID(silenceID strfmt.UUID) *GetSilenceParams

WithSilenceID adds the silenceID to the get silence params

func (*GetSilenceParams) WithTimeout

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

WithTimeout adds the timeout to the get silence params

func (*GetSilenceParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetSilenceReader

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

GetSilenceReader is a Reader for the GetSilence structure.

func (*GetSilenceReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetSilencesInternalServerError

type GetSilencesInternalServerError struct {
	Payload string
}

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

Internal server error

func NewGetSilencesInternalServerError

func NewGetSilencesInternalServerError() *GetSilencesInternalServerError

NewGetSilencesInternalServerError creates a GetSilencesInternalServerError with default headers values

func (*GetSilencesInternalServerError) Error

func (*GetSilencesInternalServerError) GetPayload added in v0.20.0

func (o *GetSilencesInternalServerError) GetPayload() string

func (*GetSilencesInternalServerError) IsClientError added in v0.25.0

func (o *GetSilencesInternalServerError) IsClientError() bool

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

func (*GetSilencesInternalServerError) IsCode added in v0.25.0

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

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

func (*GetSilencesInternalServerError) IsRedirect added in v0.25.0

func (o *GetSilencesInternalServerError) IsRedirect() bool

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

func (*GetSilencesInternalServerError) IsServerError added in v0.25.0

func (o *GetSilencesInternalServerError) IsServerError() bool

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

func (*GetSilencesInternalServerError) IsSuccess added in v0.25.0

func (o *GetSilencesInternalServerError) IsSuccess() bool

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

func (*GetSilencesInternalServerError) String added in v0.25.0

type GetSilencesOK

type GetSilencesOK struct {
	Payload models.GettableSilences
}

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

Get silences response

func NewGetSilencesOK

func NewGetSilencesOK() *GetSilencesOK

NewGetSilencesOK creates a GetSilencesOK with default headers values

func (*GetSilencesOK) Error

func (o *GetSilencesOK) Error() string

func (*GetSilencesOK) GetPayload added in v0.20.0

func (o *GetSilencesOK) GetPayload() models.GettableSilences

func (*GetSilencesOK) IsClientError added in v0.25.0

func (o *GetSilencesOK) IsClientError() bool

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

func (*GetSilencesOK) IsCode added in v0.25.0

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

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

func (*GetSilencesOK) IsRedirect added in v0.25.0

func (o *GetSilencesOK) IsRedirect() bool

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

func (*GetSilencesOK) IsServerError added in v0.25.0

func (o *GetSilencesOK) IsServerError() bool

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

func (*GetSilencesOK) IsSuccess added in v0.25.0

func (o *GetSilencesOK) IsSuccess() bool

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

func (*GetSilencesOK) String added in v0.25.0

func (o *GetSilencesOK) String() string

type GetSilencesParams

type GetSilencesParams struct {

	/* Filter.

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

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

GetSilencesParams contains all the parameters to send to the API endpoint

for the get silences operation.

Typically these are written to a http.Request.

func NewGetSilencesParams

func NewGetSilencesParams() *GetSilencesParams

NewGetSilencesParams creates a new GetSilencesParams 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 NewGetSilencesParamsWithContext

func NewGetSilencesParamsWithContext(ctx context.Context) *GetSilencesParams

NewGetSilencesParamsWithContext creates a new GetSilencesParams object with the ability to set a context for a request.

func NewGetSilencesParamsWithHTTPClient

func NewGetSilencesParamsWithHTTPClient(client *http.Client) *GetSilencesParams

NewGetSilencesParamsWithHTTPClient creates a new GetSilencesParams object with the ability to set a custom HTTPClient for a request.

func NewGetSilencesParamsWithTimeout

func NewGetSilencesParamsWithTimeout(timeout time.Duration) *GetSilencesParams

NewGetSilencesParamsWithTimeout creates a new GetSilencesParams object with the ability to set a timeout on a request.

func (*GetSilencesParams) SetContext

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

SetContext adds the context to the get silences params

func (*GetSilencesParams) SetDefaults added in v0.25.0

func (o *GetSilencesParams) SetDefaults()

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

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

func (*GetSilencesParams) SetFilter

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

SetFilter adds the filter to the get silences params

func (*GetSilencesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get silences params

func (*GetSilencesParams) SetTimeout

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

SetTimeout adds the timeout to the get silences params

func (*GetSilencesParams) WithContext

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

WithContext adds the context to the get silences params

func (*GetSilencesParams) WithDefaults added in v0.25.0

func (o *GetSilencesParams) WithDefaults() *GetSilencesParams

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

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

func (*GetSilencesParams) WithFilter

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

WithFilter adds the filter to the get silences params

func (*GetSilencesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get silences params

func (*GetSilencesParams) WithTimeout

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

WithTimeout adds the timeout to the get silences params

func (*GetSilencesParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetSilencesReader

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

GetSilencesReader is a Reader for the GetSilences structure.

func (*GetSilencesReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostSilencesBadRequest

type PostSilencesBadRequest struct {
	Payload string
}

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

Bad request

func NewPostSilencesBadRequest

func NewPostSilencesBadRequest() *PostSilencesBadRequest

NewPostSilencesBadRequest creates a PostSilencesBadRequest with default headers values

func (*PostSilencesBadRequest) Error

func (o *PostSilencesBadRequest) Error() string

func (*PostSilencesBadRequest) GetPayload added in v0.20.0

func (o *PostSilencesBadRequest) GetPayload() string

func (*PostSilencesBadRequest) IsClientError added in v0.25.0

func (o *PostSilencesBadRequest) IsClientError() bool

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

func (*PostSilencesBadRequest) IsCode added in v0.25.0

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

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

func (*PostSilencesBadRequest) IsRedirect added in v0.25.0

func (o *PostSilencesBadRequest) IsRedirect() bool

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

func (*PostSilencesBadRequest) IsServerError added in v0.25.0

func (o *PostSilencesBadRequest) IsServerError() bool

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

func (*PostSilencesBadRequest) IsSuccess added in v0.25.0

func (o *PostSilencesBadRequest) IsSuccess() bool

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

func (*PostSilencesBadRequest) String added in v0.25.0

func (o *PostSilencesBadRequest) String() string

type PostSilencesNotFound

type PostSilencesNotFound struct {
	Payload string
}

PostSilencesNotFound describes a response with status code 404, with default header values.

A silence with the specified ID was not found

func NewPostSilencesNotFound

func NewPostSilencesNotFound() *PostSilencesNotFound

NewPostSilencesNotFound creates a PostSilencesNotFound with default headers values

func (*PostSilencesNotFound) Error

func (o *PostSilencesNotFound) Error() string

func (*PostSilencesNotFound) GetPayload added in v0.20.0

func (o *PostSilencesNotFound) GetPayload() string

func (*PostSilencesNotFound) IsClientError added in v0.25.0

func (o *PostSilencesNotFound) IsClientError() bool

IsClientError returns true when this post silences not found response has a 4xx status code

func (*PostSilencesNotFound) IsCode added in v0.25.0

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

IsCode returns true when this post silences not found response a status code equal to that given

func (*PostSilencesNotFound) IsRedirect added in v0.25.0

func (o *PostSilencesNotFound) IsRedirect() bool

IsRedirect returns true when this post silences not found response has a 3xx status code

func (*PostSilencesNotFound) IsServerError added in v0.25.0

func (o *PostSilencesNotFound) IsServerError() bool

IsServerError returns true when this post silences not found response has a 5xx status code

func (*PostSilencesNotFound) IsSuccess added in v0.25.0

func (o *PostSilencesNotFound) IsSuccess() bool

IsSuccess returns true when this post silences not found response has a 2xx status code

func (*PostSilencesNotFound) String added in v0.25.0

func (o *PostSilencesNotFound) String() string

type PostSilencesOK

type PostSilencesOK struct {
	Payload *PostSilencesOKBody
}

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

Create / update silence response

func NewPostSilencesOK

func NewPostSilencesOK() *PostSilencesOK

NewPostSilencesOK creates a PostSilencesOK with default headers values

func (*PostSilencesOK) Error

func (o *PostSilencesOK) Error() string

func (*PostSilencesOK) GetPayload added in v0.20.0

func (o *PostSilencesOK) GetPayload() *PostSilencesOKBody

func (*PostSilencesOK) IsClientError added in v0.25.0

func (o *PostSilencesOK) IsClientError() bool

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

func (*PostSilencesOK) IsCode added in v0.25.0

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

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

func (*PostSilencesOK) IsRedirect added in v0.25.0

func (o *PostSilencesOK) IsRedirect() bool

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

func (*PostSilencesOK) IsServerError added in v0.25.0

func (o *PostSilencesOK) IsServerError() bool

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

func (*PostSilencesOK) IsSuccess added in v0.25.0

func (o *PostSilencesOK) IsSuccess() bool

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

func (*PostSilencesOK) String added in v0.25.0

func (o *PostSilencesOK) String() string

type PostSilencesOKBody

type PostSilencesOKBody struct {

	// silence ID
	SilenceID string `json:"silenceID,omitempty"`
}

PostSilencesOKBody post silences o k body swagger:model PostSilencesOKBody

func (*PostSilencesOKBody) ContextValidate added in v0.25.0

func (o *PostSilencesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this post silences o k body based on context it is used

func (*PostSilencesOKBody) MarshalBinary

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

MarshalBinary interface implementation

func (*PostSilencesOKBody) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*PostSilencesOKBody) Validate

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

Validate validates this post silences o k body

type PostSilencesParams

type PostSilencesParams struct {

	/* Silence.

	   The silence to create
	*/
	Silence *models.PostableSilence

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

PostSilencesParams contains all the parameters to send to the API endpoint

for the post silences operation.

Typically these are written to a http.Request.

func NewPostSilencesParams

func NewPostSilencesParams() *PostSilencesParams

NewPostSilencesParams creates a new PostSilencesParams 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 NewPostSilencesParamsWithContext

func NewPostSilencesParamsWithContext(ctx context.Context) *PostSilencesParams

NewPostSilencesParamsWithContext creates a new PostSilencesParams object with the ability to set a context for a request.

func NewPostSilencesParamsWithHTTPClient

func NewPostSilencesParamsWithHTTPClient(client *http.Client) *PostSilencesParams

NewPostSilencesParamsWithHTTPClient creates a new PostSilencesParams object with the ability to set a custom HTTPClient for a request.

func NewPostSilencesParamsWithTimeout

func NewPostSilencesParamsWithTimeout(timeout time.Duration) *PostSilencesParams

NewPostSilencesParamsWithTimeout creates a new PostSilencesParams object with the ability to set a timeout on a request.

func (*PostSilencesParams) SetContext

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

SetContext adds the context to the post silences params

func (*PostSilencesParams) SetDefaults added in v0.25.0

func (o *PostSilencesParams) SetDefaults()

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

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

func (*PostSilencesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post silences params

func (*PostSilencesParams) SetSilence

func (o *PostSilencesParams) SetSilence(silence *models.PostableSilence)

SetSilence adds the silence to the post silences params

func (*PostSilencesParams) SetTimeout

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

SetTimeout adds the timeout to the post silences params

func (*PostSilencesParams) WithContext

WithContext adds the context to the post silences params

func (*PostSilencesParams) WithDefaults added in v0.25.0

func (o *PostSilencesParams) WithDefaults() *PostSilencesParams

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

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

func (*PostSilencesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the post silences params

func (*PostSilencesParams) WithSilence

func (o *PostSilencesParams) WithSilence(silence *models.PostableSilence) *PostSilencesParams

WithSilence adds the silence to the post silences params

func (*PostSilencesParams) WithTimeout

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

WithTimeout adds the timeout to the post silences params

func (*PostSilencesParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostSilencesReader

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

PostSilencesReader is a Reader for the PostSilences structure.

func (*PostSilencesReader) ReadResponse

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