silence

package
v0.0.0-...-a7839fa Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.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) (*DeleteSilenceOK, error)

DeleteSilence Delete a silence by its ID

func (*Client) GetSilence

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

GetSilence Get a silence by its ID

func (*Client) GetSilences

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

GetSilences Get a list of silences

func (*Client) PostSilences

func (a *Client) PostSilences(params *PostSilencesParams) (*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 ClientService

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

	GetSilence(params *GetSilenceParams) (*GetSilenceOK, error)

	GetSilences(params *GetSilencesParams) (*GetSilencesOK, error)

	PostSilences(params *PostSilencesParams) (*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 handles this case 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

func (o *DeleteSilenceInternalServerError) GetPayload() string

type DeleteSilenceOK

type DeleteSilenceOK struct {
}

DeleteSilenceOK handles this case 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

type DeleteSilenceParams

type DeleteSilenceParams struct {

	/*SilenceID
	  ID of the silence to get

	*/
	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 values initialized.

func NewDeleteSilenceParamsWithContext

func NewDeleteSilenceParamsWithContext(ctx context.Context) *DeleteSilenceParams

NewDeleteSilenceParamsWithContext creates a new DeleteSilenceParams object with the default values initialized, and 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 default values initialized, and 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 default values initialized, and 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) 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) 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 handles this case 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

func (o *GetSilenceInternalServerError) GetPayload() string

type GetSilenceNotFound

type GetSilenceNotFound struct {
}

GetSilenceNotFound handles this case 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

type GetSilenceOK

type GetSilenceOK struct {
	Payload *models.GettableSilence
}

GetSilenceOK handles this case 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

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

type GetSilenceParams

type GetSilenceParams struct {

	/*SilenceID
	  ID of the silence to get

	*/
	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 values initialized.

func NewGetSilenceParamsWithContext

func NewGetSilenceParamsWithContext(ctx context.Context) *GetSilenceParams

NewGetSilenceParamsWithContext creates a new GetSilenceParams object with the default values initialized, and 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 default values initialized, and 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 default values initialized, and 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) 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) 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 handles this case 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

func (o *GetSilencesInternalServerError) GetPayload() string

type GetSilencesOK

type GetSilencesOK struct {
	Payload models.GettableSilences
}

GetSilencesOK handles this case 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

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

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 values initialized.

func NewGetSilencesParamsWithContext

func NewGetSilencesParamsWithContext(ctx context.Context) *GetSilencesParams

NewGetSilencesParamsWithContext creates a new GetSilencesParams object with the default values initialized, and 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 default values initialized, and 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 default values initialized, and 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) 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) 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 handles this case 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

func (o *PostSilencesBadRequest) GetPayload() string

type PostSilencesNotFound

type PostSilencesNotFound struct {
	Payload string
}

PostSilencesNotFound handles this case 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

func (o *PostSilencesNotFound) GetPayload() string

type PostSilencesOK

type PostSilencesOK struct {
	Payload *PostSilencesOKBody
}

PostSilencesOK handles this case 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

func (o *PostSilencesOK) GetPayload() *PostSilencesOKBody

type PostSilencesOKBody

type PostSilencesOKBody struct {

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

PostSilencesOKBody post silences o k body swagger:model PostSilencesOKBody

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 values initialized.

func NewPostSilencesParamsWithContext

func NewPostSilencesParamsWithContext(ctx context.Context) *PostSilencesParams

NewPostSilencesParamsWithContext creates a new PostSilencesParams object with the default values initialized, and 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 default values initialized, and 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 default values initialized, and 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) 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) 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