...

Package receiver

import "github.com/prometheus/alertmanager/api/v2/restapi/operations/receiver"
Overview
Index

Overview ▾

Constants

GetReceiversOKCode is the HTTP code returned for type GetReceiversOK

const GetReceiversOKCode int = 200

type GetReceivers

GetReceivers swagger:route GET /receivers receiver getReceivers

Get list of all receivers (name of notification integrations)

type GetReceivers struct {
    Context *middleware.Context
    Handler GetReceiversHandler
}

func NewGetReceivers

func NewGetReceivers(ctx *middleware.Context, handler GetReceiversHandler) *GetReceivers

NewGetReceivers creates a new http.Handler for the get receivers operation

func (*GetReceivers) ServeHTTP

func (o *GetReceivers) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetReceiversHandler

GetReceiversHandler interface for that can handle valid get receivers params

type GetReceiversHandler interface {
    Handle(GetReceiversParams) middleware.Responder
}

type GetReceiversHandlerFunc

GetReceiversHandlerFunc turns a function with the right signature into a get receivers handler

type GetReceiversHandlerFunc func(GetReceiversParams) middleware.Responder

func (GetReceiversHandlerFunc) Handle

func (fn GetReceiversHandlerFunc) Handle(params GetReceiversParams) middleware.Responder

Handle executing the request and returning a response

type GetReceiversOK

GetReceiversOK Get receivers response

swagger:response getReceiversOK

type GetReceiversOK struct {

    /*
      In: Body
    */
    Payload []*models.Receiver `json:"body,omitempty"`
}

func NewGetReceiversOK

func NewGetReceiversOK() *GetReceiversOK

NewGetReceiversOK creates GetReceiversOK with default headers values

func (*GetReceiversOK) SetPayload

func (o *GetReceiversOK) SetPayload(payload []*models.Receiver)

SetPayload sets the payload to the get receivers o k response

func (*GetReceiversOK) WithPayload

func (o *GetReceiversOK) WithPayload(payload []*models.Receiver) *GetReceiversOK

WithPayload adds the payload to the get receivers o k response

func (*GetReceiversOK) WriteResponse

func (o *GetReceiversOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetReceiversParams

GetReceiversParams contains all the bound params for the get receivers operation typically these are obtained from a http.Request

swagger:parameters getReceivers

type GetReceiversParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`
}

func NewGetReceiversParams

func NewGetReceiversParams() GetReceiversParams

NewGetReceiversParams creates a new GetReceiversParams object

There are no default values defined in the spec.

func (*GetReceiversParams) BindRequest

func (o *GetReceiversParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetReceiversParams() beforehand.

type GetReceiversURL

GetReceiversURL generates an URL for the get receivers operation

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

func (*GetReceiversURL) Build

func (o *GetReceiversURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetReceiversURL) BuildFull

func (o *GetReceiversURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetReceiversURL) Must

func (o *GetReceiversURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetReceiversURL) SetBasePath

func (o *GetReceiversURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetReceiversURL) String

func (o *GetReceiversURL) String() string

String returns the string representation of the path with query string

func (*GetReceiversURL) StringFull

func (o *GetReceiversURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetReceiversURL) WithBasePath

func (o *GetReceiversURL) WithBasePath(bp string) *GetReceiversURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string