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
GetAlerts swagger:route GET /alerts alert getAlerts
Get a list of alerts
type GetAlerts struct { Context *middleware.Context Handler GetAlertsHandler }
func NewGetAlerts(ctx *middleware.Context, handler GetAlertsHandler) *GetAlerts
NewGetAlerts creates a new http.Handler for the get alerts operation
func (o *GetAlerts) ServeHTTP(rw http.ResponseWriter, r *http.Request)
GetAlertsBadRequest Bad request
swagger:response getAlertsBadRequest
type GetAlertsBadRequest struct { /* In: Body */ Payload string `json:"body,omitempty"` }
func NewGetAlertsBadRequest() *GetAlertsBadRequest
NewGetAlertsBadRequest creates GetAlertsBadRequest with default headers values
func (o *GetAlertsBadRequest) SetPayload(payload string)
SetPayload sets the payload to the get alerts bad request response
func (o *GetAlertsBadRequest) WithPayload(payload string) *GetAlertsBadRequest
WithPayload adds the payload to the get alerts bad request response
func (o *GetAlertsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
GetAlertsHandler interface for that can handle valid get alerts params
type GetAlertsHandler interface { Handle(GetAlertsParams) middleware.Responder }
GetAlertsHandlerFunc turns a function with the right signature into a get alerts handler
type GetAlertsHandlerFunc func(GetAlertsParams) middleware.Responder
func (fn GetAlertsHandlerFunc) Handle(params GetAlertsParams) middleware.Responder
Handle executing the request and returning a response
GetAlertsInternalServerError Internal server error
swagger:response getAlertsInternalServerError
type GetAlertsInternalServerError struct { /* In: Body */ Payload string `json:"body,omitempty"` }
func NewGetAlertsInternalServerError() *GetAlertsInternalServerError
NewGetAlertsInternalServerError creates GetAlertsInternalServerError with default headers values
func (o *GetAlertsInternalServerError) SetPayload(payload string)
SetPayload sets the payload to the get alerts internal server error response
func (o *GetAlertsInternalServerError) WithPayload(payload string) *GetAlertsInternalServerError
WithPayload adds the payload to the get alerts internal server error response
func (o *GetAlertsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
GetAlertsOK Get alerts response
swagger:response getAlertsOK
type GetAlertsOK struct { /* In: Body */ Payload models.GettableAlerts `json:"body,omitempty"` }
func NewGetAlertsOK() *GetAlertsOK
NewGetAlertsOK creates GetAlertsOK with default headers values
func (o *GetAlertsOK) SetPayload(payload models.GettableAlerts)
SetPayload sets the payload to the get alerts o k response
func (o *GetAlertsOK) WithPayload(payload models.GettableAlerts) *GetAlertsOK
WithPayload adds the payload to the get alerts o k response
func (o *GetAlertsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
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() GetAlertsParams
NewGetAlertsParams creates a new GetAlertsParams object with the default values initialized.
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.
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 (o *GetAlertsURL) Build() (*url.URL, error)
Build a url path and query string
func (o *GetAlertsURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
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 (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 (o *GetAlertsURL) String() string
String returns the string representation of the path with query string
func (o *GetAlertsURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
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
PostAlerts swagger:route POST /alerts alert postAlerts
Create new Alerts
type PostAlerts struct { Context *middleware.Context Handler PostAlertsHandler }
func NewPostAlerts(ctx *middleware.Context, handler PostAlertsHandler) *PostAlerts
NewPostAlerts creates a new http.Handler for the post alerts operation
func (o *PostAlerts) ServeHTTP(rw http.ResponseWriter, r *http.Request)
PostAlertsBadRequest Bad request
swagger:response postAlertsBadRequest
type PostAlertsBadRequest struct { /* In: Body */ Payload string `json:"body,omitempty"` }
func NewPostAlertsBadRequest() *PostAlertsBadRequest
NewPostAlertsBadRequest creates PostAlertsBadRequest with default headers values
func (o *PostAlertsBadRequest) SetPayload(payload string)
SetPayload sets the payload to the post alerts bad request response
func (o *PostAlertsBadRequest) WithPayload(payload string) *PostAlertsBadRequest
WithPayload adds the payload to the post alerts bad request response
func (o *PostAlertsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
PostAlertsHandler interface for that can handle valid post alerts params
type PostAlertsHandler interface { Handle(PostAlertsParams) middleware.Responder }
PostAlertsHandlerFunc turns a function with the right signature into a post alerts handler
type PostAlertsHandlerFunc func(PostAlertsParams) middleware.Responder
func (fn PostAlertsHandlerFunc) Handle(params PostAlertsParams) middleware.Responder
Handle executing the request and returning a response
PostAlertsInternalServerError Internal server error
swagger:response postAlertsInternalServerError
type PostAlertsInternalServerError struct { /* In: Body */ Payload string `json:"body,omitempty"` }
func NewPostAlertsInternalServerError() *PostAlertsInternalServerError
NewPostAlertsInternalServerError creates PostAlertsInternalServerError with default headers values
func (o *PostAlertsInternalServerError) SetPayload(payload string)
SetPayload sets the payload to the post alerts internal server error response
func (o *PostAlertsInternalServerError) WithPayload(payload string) *PostAlertsInternalServerError
WithPayload adds the payload to the post alerts internal server error response
func (o *PostAlertsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
PostAlertsOK Create alerts response
swagger:response postAlertsOK
type PostAlertsOK struct { }
func NewPostAlertsOK() *PostAlertsOK
NewPostAlertsOK creates PostAlertsOK with default headers values
func (o *PostAlertsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
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() PostAlertsParams
NewPostAlertsParams creates a new PostAlertsParams object
There are no default values defined in the spec.
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.
PostAlertsURL generates an URL for the post alerts operation
type PostAlertsURL struct {
// contains filtered or unexported fields
}
func (o *PostAlertsURL) Build() (*url.URL, error)
Build a url path and query string
func (o *PostAlertsURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
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 (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 (o *PostAlertsURL) String() string
String returns the string representation of the path with query string
func (o *PostAlertsURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
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