...

Package alertgroup

import "github.com/prometheus/alertmanager/api/v2/client/alertgroup"
Overview
Index

Overview ▾

Index ▾

type Client
    func (a *Client) GetAlertGroups(params *GetAlertGroupsParams, opts ...ClientOption) (*GetAlertGroupsOK, error)
    func (a *Client) SetTransport(transport runtime.ClientTransport)
type ClientOption
type ClientService
    func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
type GetAlertGroupsBadRequest
    func NewGetAlertGroupsBadRequest() *GetAlertGroupsBadRequest
    func (o *GetAlertGroupsBadRequest) Error() string
    func (o *GetAlertGroupsBadRequest) GetPayload() string
    func (o *GetAlertGroupsBadRequest) IsClientError() bool
    func (o *GetAlertGroupsBadRequest) IsCode(code int) bool
    func (o *GetAlertGroupsBadRequest) IsRedirect() bool
    func (o *GetAlertGroupsBadRequest) IsServerError() bool
    func (o *GetAlertGroupsBadRequest) IsSuccess() bool
    func (o *GetAlertGroupsBadRequest) String() string
type GetAlertGroupsInternalServerError
    func NewGetAlertGroupsInternalServerError() *GetAlertGroupsInternalServerError
    func (o *GetAlertGroupsInternalServerError) Error() string
    func (o *GetAlertGroupsInternalServerError) GetPayload() string
    func (o *GetAlertGroupsInternalServerError) IsClientError() bool
    func (o *GetAlertGroupsInternalServerError) IsCode(code int) bool
    func (o *GetAlertGroupsInternalServerError) IsRedirect() bool
    func (o *GetAlertGroupsInternalServerError) IsServerError() bool
    func (o *GetAlertGroupsInternalServerError) IsSuccess() bool
    func (o *GetAlertGroupsInternalServerError) String() string
type GetAlertGroupsOK
    func NewGetAlertGroupsOK() *GetAlertGroupsOK
    func (o *GetAlertGroupsOK) Error() string
    func (o *GetAlertGroupsOK) GetPayload() models.AlertGroups
    func (o *GetAlertGroupsOK) IsClientError() bool
    func (o *GetAlertGroupsOK) IsCode(code int) bool
    func (o *GetAlertGroupsOK) IsRedirect() bool
    func (o *GetAlertGroupsOK) IsServerError() bool
    func (o *GetAlertGroupsOK) IsSuccess() bool
    func (o *GetAlertGroupsOK) String() string
type GetAlertGroupsParams
    func NewGetAlertGroupsParams() *GetAlertGroupsParams
    func NewGetAlertGroupsParamsWithContext(ctx context.Context) *GetAlertGroupsParams
    func NewGetAlertGroupsParamsWithHTTPClient(client *http.Client) *GetAlertGroupsParams
    func NewGetAlertGroupsParamsWithTimeout(timeout time.Duration) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) SetActive(active *bool)
    func (o *GetAlertGroupsParams) SetContext(ctx context.Context)
    func (o *GetAlertGroupsParams) SetDefaults()
    func (o *GetAlertGroupsParams) SetFilter(filter []string)
    func (o *GetAlertGroupsParams) SetHTTPClient(client *http.Client)
    func (o *GetAlertGroupsParams) SetInhibited(inhibited *bool)
    func (o *GetAlertGroupsParams) SetReceiver(receiver *string)
    func (o *GetAlertGroupsParams) SetSilenced(silenced *bool)
    func (o *GetAlertGroupsParams) SetTimeout(timeout time.Duration)
    func (o *GetAlertGroupsParams) WithActive(active *bool) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithContext(ctx context.Context) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithDefaults() *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithFilter(filter []string) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithHTTPClient(client *http.Client) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithInhibited(inhibited *bool) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithReceiver(receiver *string) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithSilenced(silenced *bool) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WithTimeout(timeout time.Duration) *GetAlertGroupsParams
    func (o *GetAlertGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
type GetAlertGroupsReader
    func (o *GetAlertGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

Package files

alertgroup_client.go get_alert_groups_parameters.go get_alert_groups_responses.go

type Client

Client for alertgroup API

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

func (*Client) GetAlertGroups

func (a *Client) GetAlertGroups(params *GetAlertGroupsParams, opts ...ClientOption) (*GetAlertGroupsOK, error)

GetAlertGroups Get a list of alert groups

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

ClientOption is the option for Client methods

type ClientOption func(*runtime.ClientOperation)

type ClientService

ClientService is the interface for Client methods

type ClientService interface {
    GetAlertGroups(params *GetAlertGroupsParams, opts ...ClientOption) (*GetAlertGroupsOK, error)

    SetTransport(transport runtime.ClientTransport)
}

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new alertgroup API client.

type GetAlertGroupsBadRequest

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

Bad request

type GetAlertGroupsBadRequest struct {
    Payload string
}

func NewGetAlertGroupsBadRequest

func NewGetAlertGroupsBadRequest() *GetAlertGroupsBadRequest

NewGetAlertGroupsBadRequest creates a GetAlertGroupsBadRequest with default headers values

func (*GetAlertGroupsBadRequest) Error

func (o *GetAlertGroupsBadRequest) Error() string

func (*GetAlertGroupsBadRequest) GetPayload

func (o *GetAlertGroupsBadRequest) GetPayload() string

func (*GetAlertGroupsBadRequest) IsClientError

func (o *GetAlertGroupsBadRequest) IsClientError() bool

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

func (*GetAlertGroupsBadRequest) IsCode

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

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

func (*GetAlertGroupsBadRequest) IsRedirect

func (o *GetAlertGroupsBadRequest) IsRedirect() bool

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

func (*GetAlertGroupsBadRequest) IsServerError

func (o *GetAlertGroupsBadRequest) IsServerError() bool

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

func (*GetAlertGroupsBadRequest) IsSuccess

func (o *GetAlertGroupsBadRequest) IsSuccess() bool

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

func (*GetAlertGroupsBadRequest) String

func (o *GetAlertGroupsBadRequest) String() string

type GetAlertGroupsInternalServerError

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

Internal server error

type GetAlertGroupsInternalServerError struct {
    Payload string
}

func NewGetAlertGroupsInternalServerError

func NewGetAlertGroupsInternalServerError() *GetAlertGroupsInternalServerError

NewGetAlertGroupsInternalServerError creates a GetAlertGroupsInternalServerError with default headers values

func (*GetAlertGroupsInternalServerError) Error

func (o *GetAlertGroupsInternalServerError) Error() string

func (*GetAlertGroupsInternalServerError) GetPayload

func (o *GetAlertGroupsInternalServerError) GetPayload() string

func (*GetAlertGroupsInternalServerError) IsClientError

func (o *GetAlertGroupsInternalServerError) IsClientError() bool

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

func (*GetAlertGroupsInternalServerError) IsCode

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

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

func (*GetAlertGroupsInternalServerError) IsRedirect

func (o *GetAlertGroupsInternalServerError) IsRedirect() bool

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

func (*GetAlertGroupsInternalServerError) IsServerError

func (o *GetAlertGroupsInternalServerError) IsServerError() bool

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

func (*GetAlertGroupsInternalServerError) IsSuccess

func (o *GetAlertGroupsInternalServerError) IsSuccess() bool

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

func (*GetAlertGroupsInternalServerError) String

func (o *GetAlertGroupsInternalServerError) String() string

type GetAlertGroupsOK

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

Get alert groups response

type GetAlertGroupsOK struct {
    Payload models.AlertGroups
}

func NewGetAlertGroupsOK

func NewGetAlertGroupsOK() *GetAlertGroupsOK

NewGetAlertGroupsOK creates a GetAlertGroupsOK with default headers values

func (*GetAlertGroupsOK) Error

func (o *GetAlertGroupsOK) Error() string

func (*GetAlertGroupsOK) GetPayload

func (o *GetAlertGroupsOK) GetPayload() models.AlertGroups

func (*GetAlertGroupsOK) IsClientError

func (o *GetAlertGroupsOK) IsClientError() bool

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

func (*GetAlertGroupsOK) IsCode

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

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

func (*GetAlertGroupsOK) IsRedirect

func (o *GetAlertGroupsOK) IsRedirect() bool

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

func (*GetAlertGroupsOK) IsServerError

func (o *GetAlertGroupsOK) IsServerError() bool

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

func (*GetAlertGroupsOK) IsSuccess

func (o *GetAlertGroupsOK) IsSuccess() bool

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

func (*GetAlertGroupsOK) String

func (o *GetAlertGroupsOK) String() string

type GetAlertGroupsParams

GetAlertGroupsParams contains all the parameters to send to the API endpoint

for the get alert groups operation.

Typically these are written to a http.Request.
type GetAlertGroupsParams struct {

    /* Active.

       Show active alerts

       Default: true
    */
    Active *bool

    /* Filter.

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

    /* Inhibited.

       Show inhibited alerts

       Default: true
    */
    Inhibited *bool

    /* Receiver.

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

    /* Silenced.

       Show silenced alerts

       Default: true
    */
    Silenced *bool

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

func NewGetAlertGroupsParams

func NewGetAlertGroupsParams() *GetAlertGroupsParams

NewGetAlertGroupsParams creates a new GetAlertGroupsParams 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 NewGetAlertGroupsParamsWithContext

func NewGetAlertGroupsParamsWithContext(ctx context.Context) *GetAlertGroupsParams

NewGetAlertGroupsParamsWithContext creates a new GetAlertGroupsParams object with the ability to set a context for a request.

func NewGetAlertGroupsParamsWithHTTPClient

func NewGetAlertGroupsParamsWithHTTPClient(client *http.Client) *GetAlertGroupsParams

NewGetAlertGroupsParamsWithHTTPClient creates a new GetAlertGroupsParams object with the ability to set a custom HTTPClient for a request.

func NewGetAlertGroupsParamsWithTimeout

func NewGetAlertGroupsParamsWithTimeout(timeout time.Duration) *GetAlertGroupsParams

NewGetAlertGroupsParamsWithTimeout creates a new GetAlertGroupsParams object with the ability to set a timeout on a request.

func (*GetAlertGroupsParams) SetActive

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

SetActive adds the active to the get alert groups params

func (*GetAlertGroupsParams) SetContext

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

SetContext adds the context to the get alert groups params

func (*GetAlertGroupsParams) SetDefaults

func (o *GetAlertGroupsParams) SetDefaults()

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

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

func (*GetAlertGroupsParams) SetFilter

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

SetFilter adds the filter to the get alert groups params

func (*GetAlertGroupsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get alert groups params

func (*GetAlertGroupsParams) SetInhibited

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

SetInhibited adds the inhibited to the get alert groups params

func (*GetAlertGroupsParams) SetReceiver

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

SetReceiver adds the receiver to the get alert groups params

func (*GetAlertGroupsParams) SetSilenced

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

SetSilenced adds the silenced to the get alert groups params

func (*GetAlertGroupsParams) SetTimeout

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

SetTimeout adds the timeout to the get alert groups params

func (*GetAlertGroupsParams) WithActive

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

WithActive adds the active to the get alert groups params

func (*GetAlertGroupsParams) WithContext

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

WithContext adds the context to the get alert groups params

func (*GetAlertGroupsParams) WithDefaults

func (o *GetAlertGroupsParams) WithDefaults() *GetAlertGroupsParams

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

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

func (*GetAlertGroupsParams) WithFilter

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

WithFilter adds the filter to the get alert groups params

func (*GetAlertGroupsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get alert groups params

func (*GetAlertGroupsParams) WithInhibited

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

WithInhibited adds the inhibited to the get alert groups params

func (*GetAlertGroupsParams) WithReceiver

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

WithReceiver adds the receiver to the get alert groups params

func (*GetAlertGroupsParams) WithSilenced

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

WithSilenced adds the silenced to the get alert groups params

func (*GetAlertGroupsParams) WithTimeout

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

WithTimeout adds the timeout to the get alert groups params

func (*GetAlertGroupsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetAlertGroupsReader

GetAlertGroupsReader is a Reader for the GetAlertGroups structure.

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

func (*GetAlertGroupsReader) ReadResponse

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

ReadResponse reads a server response into the received o.