...

Package general

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

Overview ▾

Index ▾

type Client
    func (a *Client) GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error)
    func (a *Client) SetTransport(transport runtime.ClientTransport)
type ClientOption
type ClientService
    func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
type GetStatusOK
    func NewGetStatusOK() *GetStatusOK
    func (o *GetStatusOK) Error() string
    func (o *GetStatusOK) GetPayload() *models.AlertmanagerStatus
    func (o *GetStatusOK) IsClientError() bool
    func (o *GetStatusOK) IsCode(code int) bool
    func (o *GetStatusOK) IsRedirect() bool
    func (o *GetStatusOK) IsServerError() bool
    func (o *GetStatusOK) IsSuccess() bool
    func (o *GetStatusOK) String() string
type GetStatusParams
    func NewGetStatusParams() *GetStatusParams
    func NewGetStatusParamsWithContext(ctx context.Context) *GetStatusParams
    func NewGetStatusParamsWithHTTPClient(client *http.Client) *GetStatusParams
    func NewGetStatusParamsWithTimeout(timeout time.Duration) *GetStatusParams
    func (o *GetStatusParams) SetContext(ctx context.Context)
    func (o *GetStatusParams) SetDefaults()
    func (o *GetStatusParams) SetHTTPClient(client *http.Client)
    func (o *GetStatusParams) SetTimeout(timeout time.Duration)
    func (o *GetStatusParams) WithContext(ctx context.Context) *GetStatusParams
    func (o *GetStatusParams) WithDefaults() *GetStatusParams
    func (o *GetStatusParams) WithHTTPClient(client *http.Client) *GetStatusParams
    func (o *GetStatusParams) WithTimeout(timeout time.Duration) *GetStatusParams
    func (o *GetStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
type GetStatusReader
    func (o *GetStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

Package files

general_client.go get_status_parameters.go get_status_responses.go

type Client

Client for general API

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

func (*Client) GetStatus

func (a *Client) GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error)

GetStatus Get current status of an Alertmanager instance and its cluster

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 {
    GetStatus(params *GetStatusParams, opts ...ClientOption) (*GetStatusOK, error)

    SetTransport(transport runtime.ClientTransport)
}

func New

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

New creates a new general API client.

type GetStatusOK

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

Get status response

type GetStatusOK struct {
    Payload *models.AlertmanagerStatus
}

func NewGetStatusOK

func NewGetStatusOK() *GetStatusOK

NewGetStatusOK creates a GetStatusOK with default headers values

func (*GetStatusOK) Error

func (o *GetStatusOK) Error() string

func (*GetStatusOK) GetPayload

func (o *GetStatusOK) GetPayload() *models.AlertmanagerStatus

func (*GetStatusOK) IsClientError

func (o *GetStatusOK) IsClientError() bool

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

func (*GetStatusOK) IsCode

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

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

func (*GetStatusOK) IsRedirect

func (o *GetStatusOK) IsRedirect() bool

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

func (*GetStatusOK) IsServerError

func (o *GetStatusOK) IsServerError() bool

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

func (*GetStatusOK) IsSuccess

func (o *GetStatusOK) IsSuccess() bool

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

func (*GetStatusOK) String

func (o *GetStatusOK) String() string

type GetStatusParams

GetStatusParams contains all the parameters to send to the API endpoint

for the get status operation.

Typically these are written to a http.Request.
type GetStatusParams struct {
    Context    context.Context
    HTTPClient *http.Client
    // contains filtered or unexported fields
}

func NewGetStatusParams

func NewGetStatusParams() *GetStatusParams

NewGetStatusParams creates a new GetStatusParams 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 NewGetStatusParamsWithContext

func NewGetStatusParamsWithContext(ctx context.Context) *GetStatusParams

NewGetStatusParamsWithContext creates a new GetStatusParams object with the ability to set a context for a request.

func NewGetStatusParamsWithHTTPClient

func NewGetStatusParamsWithHTTPClient(client *http.Client) *GetStatusParams

NewGetStatusParamsWithHTTPClient creates a new GetStatusParams object with the ability to set a custom HTTPClient for a request.

func NewGetStatusParamsWithTimeout

func NewGetStatusParamsWithTimeout(timeout time.Duration) *GetStatusParams

NewGetStatusParamsWithTimeout creates a new GetStatusParams object with the ability to set a timeout on a request.

func (*GetStatusParams) SetContext

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

SetContext adds the context to the get status params

func (*GetStatusParams) SetDefaults

func (o *GetStatusParams) SetDefaults()

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

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

func (*GetStatusParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get status params

func (*GetStatusParams) SetTimeout

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

SetTimeout adds the timeout to the get status params

func (*GetStatusParams) WithContext

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

WithContext adds the context to the get status params

func (*GetStatusParams) WithDefaults

func (o *GetStatusParams) WithDefaults() *GetStatusParams

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

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

func (*GetStatusParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get status params

func (*GetStatusParams) WithTimeout

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

WithTimeout adds the timeout to the get status params

func (*GetStatusParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetStatusReader

GetStatusReader is a Reader for the GetStatus structure.

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

func (*GetStatusReader) ReadResponse

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

ReadResponse reads a server response into the received o.