...

Package alert

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

Overview ▾

Index ▾

Constants
type GetAlerts
    func NewGetAlerts(ctx *middleware.Context, handler GetAlertsHandler) *GetAlerts
    func (o *GetAlerts) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetAlertsBadRequest
    func NewGetAlertsBadRequest() *GetAlertsBadRequest
    func (o *GetAlertsBadRequest) SetPayload(payload string)
    func (o *GetAlertsBadRequest) WithPayload(payload string) *GetAlertsBadRequest
    func (o *GetAlertsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
type GetAlertsHandler
type GetAlertsHandlerFunc
    func (fn GetAlertsHandlerFunc) Handle(params GetAlertsParams) middleware.Responder
type GetAlertsInternalServerError
    func NewGetAlertsInternalServerError() *GetAlertsInternalServerError
    func (o *GetAlertsInternalServerError) SetPayload(payload string)
    func (o *GetAlertsInternalServerError) WithPayload(payload string) *GetAlertsInternalServerError
    func (o *GetAlertsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
type GetAlertsOK
    func NewGetAlertsOK() *GetAlertsOK
    func (o *GetAlertsOK) SetPayload(payload models.GettableAlerts)
    func (o *GetAlertsOK) WithPayload(payload models.GettableAlerts) *GetAlertsOK
    func (o *GetAlertsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
type GetAlertsParams
    func NewGetAlertsParams() GetAlertsParams
    func (o *GetAlertsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
type GetAlertsURL
    func (o *GetAlertsURL) Build() (*url.URL, error)
    func (o *GetAlertsURL) BuildFull(scheme, host string) (*url.URL, error)
    func (o *GetAlertsURL) Must(u *url.URL, err error) *url.URL
    func (o *GetAlertsURL) SetBasePath(bp string)
    func (o *GetAlertsURL) String() string
    func (o *GetAlertsURL) StringFull(scheme, host string) string
    func (o *GetAlertsURL) WithBasePath(bp string) *GetAlertsURL
type PostAlerts
    func NewPostAlerts(ctx *middleware.Context, handler PostAlertsHandler) *PostAlerts
    func (o *PostAlerts) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PostAlertsBadRequest
    func NewPostAlertsBadRequest() *PostAlertsBadRequest
    func (o *PostAlertsBadRequest) SetPayload(payload string)
    func (o *PostAlertsBadRequest) WithPayload(payload string) *PostAlertsBadRequest
    func (o *PostAlertsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
type PostAlertsHandler
type PostAlertsHandlerFunc
    func (fn PostAlertsHandlerFunc) Handle(params PostAlertsParams) middleware.Responder
type PostAlertsInternalServerError
    func NewPostAlertsInternalServerError() *PostAlertsInternalServerError
    func (o *PostAlertsInternalServerError) SetPayload(payload string)
    func (o *PostAlertsInternalServerError) WithPayload(payload string) *PostAlertsInternalServerError
    func (o *PostAlertsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
type PostAlertsOK
    func NewPostAlertsOK() *PostAlertsOK
    func (o *PostAlertsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
type PostAlertsParams
    func NewPostAlertsParams() PostAlertsParams
    func (o *PostAlertsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
type PostAlertsURL
    func (o *PostAlertsURL) Build() (*url.URL, error)
    func (o *PostAlertsURL) BuildFull(scheme, host string) (*url.URL, error)
    func (o *PostAlertsURL) Must(u *url.URL, err error) *url.URL
    func (o *PostAlertsURL) SetBasePath(bp string)
    func (o *PostAlertsURL) String() string
    func (o *PostAlertsURL) StringFull(scheme, host string) string
    func (o *PostAlertsURL) WithBasePath(bp string) *PostAlertsURL

Package files

get_alerts.go get_alerts_parameters.go get_alerts_responses.go get_alerts_urlbuilder.go post_alerts.go post_alerts_parameters.go post_alerts_responses.go post_alerts_urlbuilder.go

Constants

GetAlertsBadRequestCode is the HTTP code returned for type GetAlertsBadRequest

const GetAlertsBadRequestCode int = 400

GetAlertsInternalServerErrorCode is the HTTP code returned for type GetAlertsInternalServerError

const GetAlertsInternalServerErrorCode int = 500

GetAlertsOKCode is the HTTP code returned for type GetAlertsOK

const GetAlertsOKCode int = 200

PostAlertsBadRequestCode is the HTTP code returned for type PostAlertsBadRequest

const PostAlertsBadRequestCode int = 400

PostAlertsInternalServerErrorCode is the HTTP code returned for type PostAlertsInternalServerError

const PostAlertsInternalServerErrorCode int = 500

PostAlertsOKCode is the HTTP code returned for type PostAlertsOK

const PostAlertsOKCode int = 200

type GetAlerts

GetAlerts swagger:route GET /alerts alert getAlerts

Get a list of alerts

type GetAlerts struct {
    Context *middleware.Context
    Handler GetAlertsHandler
}

func NewGetAlerts

func NewGetAlerts(ctx *middleware.Context, handler GetAlertsHandler) *GetAlerts

NewGetAlerts creates a new http.Handler for the get alerts operation

func (*GetAlerts) ServeHTTP

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

type GetAlertsBadRequest

GetAlertsBadRequest Bad request

swagger:response getAlertsBadRequest

type GetAlertsBadRequest struct {

    /*
      In: Body
    */
    Payload string `json:"body,omitempty"`
}

func NewGetAlertsBadRequest

func NewGetAlertsBadRequest() *GetAlertsBadRequest

NewGetAlertsBadRequest creates GetAlertsBadRequest with default headers values

func (*GetAlertsBadRequest) SetPayload

func (o *GetAlertsBadRequest) SetPayload(payload string)

SetPayload sets the payload to the get alerts bad request response

func (*GetAlertsBadRequest) WithPayload

func (o *GetAlertsBadRequest) WithPayload(payload string) *GetAlertsBadRequest

WithPayload adds the payload to the get alerts bad request response

func (*GetAlertsBadRequest) WriteResponse

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

WriteResponse to the client

type GetAlertsHandler

GetAlertsHandler interface for that can handle valid get alerts params

type GetAlertsHandler interface {
    Handle(GetAlertsParams) middleware.Responder
}

type GetAlertsHandlerFunc

GetAlertsHandlerFunc turns a function with the right signature into a get alerts handler

type GetAlertsHandlerFunc func(GetAlertsParams) middleware.Responder

func (GetAlertsHandlerFunc) Handle

func (fn GetAlertsHandlerFunc) Handle(params GetAlertsParams) middleware.Responder

Handle executing the request and returning a response

type GetAlertsInternalServerError

GetAlertsInternalServerError Internal server error

swagger:response getAlertsInternalServerError

type GetAlertsInternalServerError struct {

    /*
      In: Body
    */
    Payload string `json:"body,omitempty"`
}

func NewGetAlertsInternalServerError

func NewGetAlertsInternalServerError() *GetAlertsInternalServerError

NewGetAlertsInternalServerError creates GetAlertsInternalServerError with default headers values

func (*GetAlertsInternalServerError) SetPayload

func (o *GetAlertsInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the get alerts internal server error response

func (*GetAlertsInternalServerError) WithPayload

func (o *GetAlertsInternalServerError) WithPayload(payload string) *GetAlertsInternalServerError

WithPayload adds the payload to the get alerts internal server error response

func (*GetAlertsInternalServerError) WriteResponse

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

WriteResponse to the client

type GetAlertsOK

GetAlertsOK Get alerts response

swagger:response getAlertsOK

type GetAlertsOK struct {

    /*
      In: Body
    */
    Payload models.GettableAlerts `json:"body,omitempty"`
}

func NewGetAlertsOK

func NewGetAlertsOK() *GetAlertsOK

NewGetAlertsOK creates GetAlertsOK with default headers values

func (*GetAlertsOK) SetPayload

func (o *GetAlertsOK) SetPayload(payload models.GettableAlerts)

SetPayload sets the payload to the get alerts o k response

func (*GetAlertsOK) WithPayload

func (o *GetAlertsOK) WithPayload(payload models.GettableAlerts) *GetAlertsOK

WithPayload adds the payload to the get alerts o k response

func (*GetAlertsOK) WriteResponse

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

WriteResponse to the client

type GetAlertsParams

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

swagger:parameters getAlerts

type GetAlertsParams struct {

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

    /*Show active alerts
      In: query
      Default: true
    */
    Active *bool
    /*A list of matchers to filter alerts by
      In: query
      Collection Format: multi
    */
    Filter []string
    /*Show inhibited alerts
      In: query
      Default: true
    */
    Inhibited *bool
    /*A regex matching receivers to filter alerts by
      In: query
    */
    Receiver *string
    /*Show silenced alerts
      In: query
      Default: true
    */
    Silenced *bool
    /*Show unprocessed alerts
      In: query
      Default: true
    */
    Unprocessed *bool
}

func NewGetAlertsParams

func NewGetAlertsParams() GetAlertsParams

NewGetAlertsParams creates a new GetAlertsParams object with the default values initialized.

func (*GetAlertsParams) BindRequest

func (o *GetAlertsParams) 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 NewGetAlertsParams() beforehand.

type GetAlertsURL

GetAlertsURL generates an URL for the get alerts operation

type GetAlertsURL struct {
    Active      *bool
    Filter      []string
    Inhibited   *bool
    Receiver    *string
    Silenced    *bool
    Unprocessed *bool
    // contains filtered or unexported fields
}

func (*GetAlertsURL) Build

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

Build a url path and query string

func (*GetAlertsURL) BuildFull

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

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

func (*GetAlertsURL) Must

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

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

func (*GetAlertsURL) SetBasePath

func (o *GetAlertsURL) 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 (*GetAlertsURL) String

func (o *GetAlertsURL) String() string

String returns the string representation of the path with query string

func (*GetAlertsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetAlertsURL) WithBasePath

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

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

type PostAlerts

PostAlerts swagger:route POST /alerts alert postAlerts

Create new Alerts

type PostAlerts struct {
    Context *middleware.Context
    Handler PostAlertsHandler
}

func NewPostAlerts

func NewPostAlerts(ctx *middleware.Context, handler PostAlertsHandler) *PostAlerts

NewPostAlerts creates a new http.Handler for the post alerts operation

func (*PostAlerts) ServeHTTP

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

type PostAlertsBadRequest

PostAlertsBadRequest Bad request

swagger:response postAlertsBadRequest

type PostAlertsBadRequest struct {

    /*
      In: Body
    */
    Payload string `json:"body,omitempty"`
}

func NewPostAlertsBadRequest

func NewPostAlertsBadRequest() *PostAlertsBadRequest

NewPostAlertsBadRequest creates PostAlertsBadRequest with default headers values

func (*PostAlertsBadRequest) SetPayload

func (o *PostAlertsBadRequest) SetPayload(payload string)

SetPayload sets the payload to the post alerts bad request response

func (*PostAlertsBadRequest) WithPayload

func (o *PostAlertsBadRequest) WithPayload(payload string) *PostAlertsBadRequest

WithPayload adds the payload to the post alerts bad request response

func (*PostAlertsBadRequest) WriteResponse

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

WriteResponse to the client

type PostAlertsHandler

PostAlertsHandler interface for that can handle valid post alerts params

type PostAlertsHandler interface {
    Handle(PostAlertsParams) middleware.Responder
}

type PostAlertsHandlerFunc

PostAlertsHandlerFunc turns a function with the right signature into a post alerts handler

type PostAlertsHandlerFunc func(PostAlertsParams) middleware.Responder

func (PostAlertsHandlerFunc) Handle

func (fn PostAlertsHandlerFunc) Handle(params PostAlertsParams) middleware.Responder

Handle executing the request and returning a response

type PostAlertsInternalServerError

PostAlertsInternalServerError Internal server error

swagger:response postAlertsInternalServerError

type PostAlertsInternalServerError struct {

    /*
      In: Body
    */
    Payload string `json:"body,omitempty"`
}

func NewPostAlertsInternalServerError

func NewPostAlertsInternalServerError() *PostAlertsInternalServerError

NewPostAlertsInternalServerError creates PostAlertsInternalServerError with default headers values

func (*PostAlertsInternalServerError) SetPayload

func (o *PostAlertsInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the post alerts internal server error response

func (*PostAlertsInternalServerError) WithPayload

func (o *PostAlertsInternalServerError) WithPayload(payload string) *PostAlertsInternalServerError

WithPayload adds the payload to the post alerts internal server error response

func (*PostAlertsInternalServerError) WriteResponse

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

WriteResponse to the client

type PostAlertsOK

PostAlertsOK Create alerts response

swagger:response postAlertsOK

type PostAlertsOK struct {
}

func NewPostAlertsOK

func NewPostAlertsOK() *PostAlertsOK

NewPostAlertsOK creates PostAlertsOK with default headers values

func (*PostAlertsOK) WriteResponse

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

WriteResponse to the client

type PostAlertsParams

PostAlertsParams contains all the bound params for the post alerts operation typically these are obtained from a http.Request

swagger:parameters postAlerts

type PostAlertsParams struct {

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

    /*The alerts to create
      Required: true
      In: body
    */
    Alerts models.PostableAlerts
}

func NewPostAlertsParams

func NewPostAlertsParams() PostAlertsParams

NewPostAlertsParams creates a new PostAlertsParams object

There are no default values defined in the spec.

func (*PostAlertsParams) BindRequest

func (o *PostAlertsParams) 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 NewPostAlertsParams() beforehand.

type PostAlertsURL

PostAlertsURL generates an URL for the post alerts operation

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

func (*PostAlertsURL) Build

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

Build a url path and query string

func (*PostAlertsURL) BuildFull

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

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

func (*PostAlertsURL) Must

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

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

func (*PostAlertsURL) SetBasePath

func (o *PostAlertsURL) 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 (*PostAlertsURL) String

func (o *PostAlertsURL) String() string

String returns the string representation of the path with query string

func (*PostAlertsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostAlertsURL) WithBasePath

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

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