silence

package
v2.0.0-prerelease3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 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 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

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

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) Code

Code gets the status code for the delete silence internal server error response

func (*DeleteSilenceInternalServerError) Error

func (*DeleteSilenceInternalServerError) GetPayload

func (o *DeleteSilenceInternalServerError) GetPayload() string

func (*DeleteSilenceInternalServerError) IsClientError

func (o *DeleteSilenceInternalServerError) IsClientError() bool

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

func (*DeleteSilenceInternalServerError) IsCode

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

func (o *DeleteSilenceInternalServerError) IsRedirect() bool

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

func (*DeleteSilenceInternalServerError) IsServerError

func (o *DeleteSilenceInternalServerError) IsServerError() bool

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

func (*DeleteSilenceInternalServerError) IsSuccess

func (o *DeleteSilenceInternalServerError) IsSuccess() bool

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

func (*DeleteSilenceInternalServerError) String

type DeleteSilenceNotFound

type DeleteSilenceNotFound struct {
}

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

A silence with the specified ID was not found

func NewDeleteSilenceNotFound

func NewDeleteSilenceNotFound() *DeleteSilenceNotFound

NewDeleteSilenceNotFound creates a DeleteSilenceNotFound with default headers values

func (*DeleteSilenceNotFound) Code

func (o *DeleteSilenceNotFound) Code() int

Code gets the status code for the delete silence not found response

func (*DeleteSilenceNotFound) Error

func (o *DeleteSilenceNotFound) Error() string

func (*DeleteSilenceNotFound) IsClientError

func (o *DeleteSilenceNotFound) IsClientError() bool

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

func (*DeleteSilenceNotFound) IsCode

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

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

func (*DeleteSilenceNotFound) IsRedirect

func (o *DeleteSilenceNotFound) IsRedirect() bool

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

func (*DeleteSilenceNotFound) IsServerError

func (o *DeleteSilenceNotFound) IsServerError() bool

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

func (*DeleteSilenceNotFound) IsSuccess

func (o *DeleteSilenceNotFound) IsSuccess() bool

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

func (*DeleteSilenceNotFound) String

func (o *DeleteSilenceNotFound) String() string

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) Code

func (o *DeleteSilenceOK) Code() int

Code gets the status code for the delete silence o k response

func (*DeleteSilenceOK) Error

func (o *DeleteSilenceOK) Error() string

func (*DeleteSilenceOK) IsClientError

func (o *DeleteSilenceOK) IsClientError() bool

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

func (*DeleteSilenceOK) IsCode

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

func (o *DeleteSilenceOK) IsRedirect() bool

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

func (*DeleteSilenceOK) IsServerError

func (o *DeleteSilenceOK) IsServerError() bool

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

func (*DeleteSilenceOK) IsSuccess

func (o *DeleteSilenceOK) IsSuccess() bool

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

func (*DeleteSilenceOK) String

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

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

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) Code

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

func (*GetSilenceInternalServerError) Error

func (*GetSilenceInternalServerError) GetPayload

func (o *GetSilenceInternalServerError) GetPayload() string

func (*GetSilenceInternalServerError) IsClientError

func (o *GetSilenceInternalServerError) IsClientError() bool

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

func (*GetSilenceInternalServerError) IsCode

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

func (o *GetSilenceInternalServerError) IsRedirect() bool

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

func (*GetSilenceInternalServerError) IsServerError

func (o *GetSilenceInternalServerError) IsServerError() bool

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

func (*GetSilenceInternalServerError) IsSuccess

func (o *GetSilenceInternalServerError) IsSuccess() bool

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

func (*GetSilenceInternalServerError) String

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) Code

func (o *GetSilenceNotFound) Code() int

Code gets the status code for the get silence not found response

func (*GetSilenceNotFound) Error

func (o *GetSilenceNotFound) Error() string

func (*GetSilenceNotFound) IsClientError

func (o *GetSilenceNotFound) IsClientError() bool

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

func (*GetSilenceNotFound) IsCode

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

func (o *GetSilenceNotFound) IsRedirect() bool

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

func (*GetSilenceNotFound) IsServerError

func (o *GetSilenceNotFound) IsServerError() bool

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

func (*GetSilenceNotFound) IsSuccess

func (o *GetSilenceNotFound) IsSuccess() bool

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

func (*GetSilenceNotFound) String

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) Code

func (o *GetSilenceOK) Code() int

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

func (*GetSilenceOK) Error

func (o *GetSilenceOK) Error() string

func (*GetSilenceOK) GetPayload

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

func (*GetSilenceOK) IsClientError

func (o *GetSilenceOK) IsClientError() bool

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

func (*GetSilenceOK) IsCode

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

func (o *GetSilenceOK) IsRedirect() bool

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

func (*GetSilenceOK) IsServerError

func (o *GetSilenceOK) IsServerError() bool

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

func (*GetSilenceOK) IsSuccess

func (o *GetSilenceOK) IsSuccess() bool

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

func (*GetSilenceOK) String

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

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

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) Code

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

func (*GetSilencesInternalServerError) Error

func (*GetSilencesInternalServerError) GetPayload

func (o *GetSilencesInternalServerError) GetPayload() string

func (*GetSilencesInternalServerError) IsClientError

func (o *GetSilencesInternalServerError) IsClientError() bool

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

func (*GetSilencesInternalServerError) IsCode

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

func (o *GetSilencesInternalServerError) IsRedirect() bool

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

func (*GetSilencesInternalServerError) IsServerError

func (o *GetSilencesInternalServerError) IsServerError() bool

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

func (*GetSilencesInternalServerError) IsSuccess

func (o *GetSilencesInternalServerError) IsSuccess() bool

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

func (*GetSilencesInternalServerError) String

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) Code

func (o *GetSilencesOK) Code() int

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

func (*GetSilencesOK) Error

func (o *GetSilencesOK) Error() string

func (*GetSilencesOK) GetPayload

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

func (*GetSilencesOK) IsClientError

func (o *GetSilencesOK) IsClientError() bool

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

func (*GetSilencesOK) IsCode

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

func (o *GetSilencesOK) IsRedirect() bool

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

func (*GetSilencesOK) IsServerError

func (o *GetSilencesOK) IsServerError() bool

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

func (*GetSilencesOK) IsSuccess

func (o *GetSilencesOK) IsSuccess() bool

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

func (*GetSilencesOK) String

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

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

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) Code

func (o *PostSilencesBadRequest) Code() int

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

func (*PostSilencesBadRequest) Error

func (o *PostSilencesBadRequest) Error() string

func (*PostSilencesBadRequest) GetPayload

func (o *PostSilencesBadRequest) GetPayload() string

func (*PostSilencesBadRequest) IsClientError

func (o *PostSilencesBadRequest) IsClientError() bool

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

func (*PostSilencesBadRequest) IsCode

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

func (o *PostSilencesBadRequest) IsRedirect() bool

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

func (*PostSilencesBadRequest) IsServerError

func (o *PostSilencesBadRequest) IsServerError() bool

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

func (*PostSilencesBadRequest) IsSuccess

func (o *PostSilencesBadRequest) IsSuccess() bool

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

func (*PostSilencesBadRequest) String

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) Code

func (o *PostSilencesNotFound) Code() int

Code gets the status code for the post silences not found response

func (*PostSilencesNotFound) Error

func (o *PostSilencesNotFound) Error() string

func (*PostSilencesNotFound) GetPayload

func (o *PostSilencesNotFound) GetPayload() string

func (*PostSilencesNotFound) IsClientError

func (o *PostSilencesNotFound) IsClientError() bool

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

func (*PostSilencesNotFound) IsCode

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

func (o *PostSilencesNotFound) IsRedirect() bool

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

func (*PostSilencesNotFound) IsServerError

func (o *PostSilencesNotFound) IsServerError() bool

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

func (*PostSilencesNotFound) IsSuccess

func (o *PostSilencesNotFound) IsSuccess() bool

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

func (*PostSilencesNotFound) String

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) Code

func (o *PostSilencesOK) Code() int

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

func (*PostSilencesOK) Error

func (o *PostSilencesOK) Error() string

func (*PostSilencesOK) GetPayload

func (o *PostSilencesOK) GetPayload() *PostSilencesOKBody

func (*PostSilencesOK) IsClientError

func (o *PostSilencesOK) IsClientError() bool

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

func (*PostSilencesOK) IsCode

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

func (o *PostSilencesOK) IsRedirect() bool

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

func (*PostSilencesOK) IsServerError

func (o *PostSilencesOK) IsServerError() bool

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

func (*PostSilencesOK) IsSuccess

func (o *PostSilencesOK) IsSuccess() bool

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

func (*PostSilencesOK) String

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

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

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

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