alert

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

View Source
const GetAlertsBadRequestCode int = 400

GetAlertsBadRequestCode is the HTTP code returned for type GetAlertsBadRequest

View Source
const GetAlertsInternalServerErrorCode int = 500

GetAlertsInternalServerErrorCode is the HTTP code returned for type GetAlertsInternalServerError

View Source
const GetAlertsOKCode int = 200

GetAlertsOKCode is the HTTP code returned for type GetAlertsOK

View Source
const PostAlertsBadRequestCode int = 400

PostAlertsBadRequestCode is the HTTP code returned for type PostAlertsBadRequest

View Source
const PostAlertsInternalServerErrorCode int = 500

PostAlertsInternalServerErrorCode is the HTTP code returned for type PostAlertsInternalServerError

View Source
const PostAlertsOKCode int = 200

PostAlertsOKCode is the HTTP code returned for type PostAlertsOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetAlerts

type GetAlerts struct {
	Context *middleware.Context
	Handler GetAlertsHandler
}
GetAlerts swagger:route GET /alerts alert getAlerts

Get a list of alerts

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

type GetAlertsBadRequest struct {

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

GetAlertsBadRequest Bad request

swagger:response getAlertsBadRequest

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

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

GetAlertsHandler interface for that can handle valid get alerts params

type GetAlertsHandlerFunc

type GetAlertsHandlerFunc func(GetAlertsParams) middleware.Responder

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

func (GetAlertsHandlerFunc) Handle

Handle executing the request and returning a response

type GetAlertsInternalServerError

type GetAlertsInternalServerError struct {

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

GetAlertsInternalServerError Internal server error

swagger:response getAlertsInternalServerError

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

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

type GetAlertsOK struct {

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

GetAlertsOK Get alerts response

swagger:response getAlertsOK

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

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
}

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

swagger:parameters getAlerts

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

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

GetAlertsURL generates an URL for the get alerts operation

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

type PostAlerts struct {
	Context *middleware.Context
	Handler PostAlertsHandler
}
PostAlerts swagger:route POST /alerts alert postAlerts

Create new Alerts

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

type PostAlertsBadRequest struct {

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

PostAlertsBadRequest Bad request

swagger:response postAlertsBadRequest

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

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

PostAlertsHandler interface for that can handle valid post alerts params

type PostAlertsHandlerFunc

type PostAlertsHandlerFunc func(PostAlertsParams) middleware.Responder

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

func (PostAlertsHandlerFunc) Handle

Handle executing the request and returning a response

type PostAlertsInternalServerError

type PostAlertsInternalServerError struct {

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

PostAlertsInternalServerError Internal server error

swagger:response postAlertsInternalServerError

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

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

type PostAlertsOK struct {
}

PostAlertsOK Create alerts response

swagger:response postAlertsOK

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

type PostAlertsParams struct {

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

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

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

swagger:parameters postAlerts

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

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

PostAlertsURL generates an URL for the post alerts operation

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL