silence

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

View Source
const DeleteSilenceInternalServerErrorCode int = 500

DeleteSilenceInternalServerErrorCode is the HTTP code returned for type DeleteSilenceInternalServerError

View Source
const DeleteSilenceOKCode int = 200

DeleteSilenceOKCode is the HTTP code returned for type DeleteSilenceOK

View Source
const GetSilenceInternalServerErrorCode int = 500

GetSilenceInternalServerErrorCode is the HTTP code returned for type GetSilenceInternalServerError

View Source
const GetSilenceNotFoundCode int = 404

GetSilenceNotFoundCode is the HTTP code returned for type GetSilenceNotFound

View Source
const GetSilenceOKCode int = 200

GetSilenceOKCode is the HTTP code returned for type GetSilenceOK

View Source
const GetSilencesInternalServerErrorCode int = 500

GetSilencesInternalServerErrorCode is the HTTP code returned for type GetSilencesInternalServerError

View Source
const GetSilencesOKCode int = 200

GetSilencesOKCode is the HTTP code returned for type GetSilencesOK

View Source
const PostSilencesBadRequestCode int = 400

PostSilencesBadRequestCode is the HTTP code returned for type PostSilencesBadRequest

View Source
const PostSilencesNotFoundCode int = 404

PostSilencesNotFoundCode is the HTTP code returned for type PostSilencesNotFound

View Source
const PostSilencesOKCode int = 200

PostSilencesOKCode is the HTTP code returned for type PostSilencesOK

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteSilence

type DeleteSilence struct {
	Context *middleware.Context
	Handler DeleteSilenceHandler
}

DeleteSilence swagger:route DELETE /silence/{silenceID} silence deleteSilence

Delete a silence by its ID

func NewDeleteSilence

func NewDeleteSilence(ctx *middleware.Context, handler DeleteSilenceHandler) *DeleteSilence

NewDeleteSilence creates a new http.Handler for the delete silence operation

func (*DeleteSilence) ServeHTTP

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

type DeleteSilenceHandler

type DeleteSilenceHandler interface {
	Handle(DeleteSilenceParams) middleware.Responder
}

DeleteSilenceHandler interface for that can handle valid delete silence params

type DeleteSilenceHandlerFunc

type DeleteSilenceHandlerFunc func(DeleteSilenceParams) middleware.Responder

DeleteSilenceHandlerFunc turns a function with the right signature into a delete silence handler

func (DeleteSilenceHandlerFunc) Handle

Handle executing the request and returning a response

type DeleteSilenceInternalServerError

type DeleteSilenceInternalServerError struct {

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

DeleteSilenceInternalServerError Internal server error

swagger:response deleteSilenceInternalServerError

func NewDeleteSilenceInternalServerError

func NewDeleteSilenceInternalServerError() *DeleteSilenceInternalServerError

NewDeleteSilenceInternalServerError creates DeleteSilenceInternalServerError with default headers values

func (*DeleteSilenceInternalServerError) SetPayload

func (o *DeleteSilenceInternalServerError) SetPayload(payload string)

SetPayload sets the payload to the delete silence internal server error response

func (*DeleteSilenceInternalServerError) WithPayload

WithPayload adds the payload to the delete silence internal server error response

func (*DeleteSilenceInternalServerError) WriteResponse

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

WriteResponse to the client

type DeleteSilenceOK

type DeleteSilenceOK struct {
}

DeleteSilenceOK Delete silence response

swagger:response deleteSilenceOK

func NewDeleteSilenceOK

func NewDeleteSilenceOK() *DeleteSilenceOK

NewDeleteSilenceOK creates DeleteSilenceOK with default headers values

func (*DeleteSilenceOK) WriteResponse

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

WriteResponse to the client

type DeleteSilenceParams

type DeleteSilenceParams struct {

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

	/*ID of the silence to get
	  Required: true
	  In: path
	*/
	SilenceID strfmt.UUID
}

DeleteSilenceParams contains all the bound params for the delete silence operation typically these are obtained from a http.Request

swagger:parameters deleteSilence

func NewDeleteSilenceParams

func NewDeleteSilenceParams() DeleteSilenceParams

NewDeleteSilenceParams creates a new DeleteSilenceParams object no default values defined in spec.

func (*DeleteSilenceParams) BindRequest

func (o *DeleteSilenceParams) 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 NewDeleteSilenceParams() beforehand.

type DeleteSilenceURL

type DeleteSilenceURL struct {
	SilenceID strfmt.UUID
	// contains filtered or unexported fields
}

DeleteSilenceURL generates an URL for the delete silence operation

func (*DeleteSilenceURL) Build

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

Build a url path and query string

func (*DeleteSilenceURL) BuildFull

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

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

func (*DeleteSilenceURL) Must

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

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

func (*DeleteSilenceURL) SetBasePath

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

func (o *DeleteSilenceURL) String() string

String returns the string representation of the path with query string

func (*DeleteSilenceURL) StringFull

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

StringFull returns the string representation of a complete url

func (*DeleteSilenceURL) WithBasePath

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

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 GetSilence

type GetSilence struct {
	Context *middleware.Context
	Handler GetSilenceHandler
}

GetSilence swagger:route GET /silence/{silenceID} silence getSilence

Get a silence by its ID

func NewGetSilence

func NewGetSilence(ctx *middleware.Context, handler GetSilenceHandler) *GetSilence

NewGetSilence creates a new http.Handler for the get silence operation

func (*GetSilence) ServeHTTP

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

type GetSilenceHandler

type GetSilenceHandler interface {
	Handle(GetSilenceParams) middleware.Responder
}

GetSilenceHandler interface for that can handle valid get silence params

type GetSilenceHandlerFunc

type GetSilenceHandlerFunc func(GetSilenceParams) middleware.Responder

GetSilenceHandlerFunc turns a function with the right signature into a get silence handler

func (GetSilenceHandlerFunc) Handle

Handle executing the request and returning a response

type GetSilenceInternalServerError

type GetSilenceInternalServerError struct {

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

GetSilenceInternalServerError Internal server error

swagger:response getSilenceInternalServerError

func NewGetSilenceInternalServerError

func NewGetSilenceInternalServerError() *GetSilenceInternalServerError

NewGetSilenceInternalServerError creates GetSilenceInternalServerError with default headers values

func (*GetSilenceInternalServerError) SetPayload

func (o *GetSilenceInternalServerError) SetPayload(payload string)

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

func (*GetSilenceInternalServerError) WithPayload

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

func (*GetSilenceInternalServerError) WriteResponse

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

WriteResponse to the client

type GetSilenceNotFound

type GetSilenceNotFound struct {
}

GetSilenceNotFound A silence with the specified ID was not found

swagger:response getSilenceNotFound

func NewGetSilenceNotFound

func NewGetSilenceNotFound() *GetSilenceNotFound

NewGetSilenceNotFound creates GetSilenceNotFound with default headers values

func (*GetSilenceNotFound) WriteResponse

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

WriteResponse to the client

type GetSilenceOK

type GetSilenceOK struct {

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

GetSilenceOK Get silence response

swagger:response getSilenceOK

func NewGetSilenceOK

func NewGetSilenceOK() *GetSilenceOK

NewGetSilenceOK creates GetSilenceOK with default headers values

func (*GetSilenceOK) SetPayload

func (o *GetSilenceOK) SetPayload(payload *models.GettableSilence)

SetPayload sets the payload to the get silence o k response

func (*GetSilenceOK) WithPayload

func (o *GetSilenceOK) WithPayload(payload *models.GettableSilence) *GetSilenceOK

WithPayload adds the payload to the get silence o k response

func (*GetSilenceOK) WriteResponse

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

WriteResponse to the client

type GetSilenceParams

type GetSilenceParams struct {

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

	/*ID of the silence to get
	  Required: true
	  In: path
	*/
	SilenceID strfmt.UUID
}

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

swagger:parameters getSilence

func NewGetSilenceParams

func NewGetSilenceParams() GetSilenceParams

NewGetSilenceParams creates a new GetSilenceParams object no default values defined in spec.

func (*GetSilenceParams) BindRequest

func (o *GetSilenceParams) 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 NewGetSilenceParams() beforehand.

type GetSilenceURL

type GetSilenceURL struct {
	SilenceID strfmt.UUID
	// contains filtered or unexported fields
}

GetSilenceURL generates an URL for the get silence operation

func (*GetSilenceURL) Build

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

Build a url path and query string

func (*GetSilenceURL) BuildFull

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

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

func (*GetSilenceURL) Must

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

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

func (*GetSilenceURL) SetBasePath

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

func (o *GetSilenceURL) String() string

String returns the string representation of the path with query string

func (*GetSilenceURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetSilenceURL) WithBasePath

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

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 GetSilences

type GetSilences struct {
	Context *middleware.Context
	Handler GetSilencesHandler
}

GetSilences swagger:route GET /silences silence getSilences

Get a list of silences

func NewGetSilences

func NewGetSilences(ctx *middleware.Context, handler GetSilencesHandler) *GetSilences

NewGetSilences creates a new http.Handler for the get silences operation

func (*GetSilences) ServeHTTP

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

type GetSilencesHandler

type GetSilencesHandler interface {
	Handle(GetSilencesParams) middleware.Responder
}

GetSilencesHandler interface for that can handle valid get silences params

type GetSilencesHandlerFunc

type GetSilencesHandlerFunc func(GetSilencesParams) middleware.Responder

GetSilencesHandlerFunc turns a function with the right signature into a get silences handler

func (GetSilencesHandlerFunc) Handle

Handle executing the request and returning a response

type GetSilencesInternalServerError

type GetSilencesInternalServerError struct {

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

GetSilencesInternalServerError Internal server error

swagger:response getSilencesInternalServerError

func NewGetSilencesInternalServerError

func NewGetSilencesInternalServerError() *GetSilencesInternalServerError

NewGetSilencesInternalServerError creates GetSilencesInternalServerError with default headers values

func (*GetSilencesInternalServerError) SetPayload

func (o *GetSilencesInternalServerError) SetPayload(payload string)

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

func (*GetSilencesInternalServerError) WithPayload

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

func (*GetSilencesInternalServerError) WriteResponse

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

WriteResponse to the client

type GetSilencesOK

type GetSilencesOK struct {

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

GetSilencesOK Get silences response

swagger:response getSilencesOK

func NewGetSilencesOK

func NewGetSilencesOK() *GetSilencesOK

NewGetSilencesOK creates GetSilencesOK with default headers values

func (*GetSilencesOK) SetPayload

func (o *GetSilencesOK) SetPayload(payload models.GettableSilences)

SetPayload sets the payload to the get silences o k response

func (*GetSilencesOK) WithPayload

func (o *GetSilencesOK) WithPayload(payload models.GettableSilences) *GetSilencesOK

WithPayload adds the payload to the get silences o k response

func (*GetSilencesOK) WriteResponse

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

WriteResponse to the client

type GetSilencesParams

type GetSilencesParams struct {

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

	/*A list of matchers to filter silences by
	  In: query
	  Collection Format: multi
	*/
	Filter []string
}

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

swagger:parameters getSilences

func NewGetSilencesParams

func NewGetSilencesParams() GetSilencesParams

NewGetSilencesParams creates a new GetSilencesParams object no default values defined in spec.

func (*GetSilencesParams) BindRequest

func (o *GetSilencesParams) 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 NewGetSilencesParams() beforehand.

type GetSilencesURL

type GetSilencesURL struct {
	Filter []string
	// contains filtered or unexported fields
}

GetSilencesURL generates an URL for the get silences operation

func (*GetSilencesURL) Build

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

Build a url path and query string

func (*GetSilencesURL) BuildFull

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

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

func (*GetSilencesURL) Must

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

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

func (*GetSilencesURL) SetBasePath

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

func (o *GetSilencesURL) String() string

String returns the string representation of the path with query string

func (*GetSilencesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetSilencesURL) WithBasePath

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

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 PostSilences

type PostSilences struct {
	Context *middleware.Context
	Handler PostSilencesHandler
}

PostSilences swagger:route POST /silences silence postSilences

Post a new silence or update an existing one

func NewPostSilences

func NewPostSilences(ctx *middleware.Context, handler PostSilencesHandler) *PostSilences

NewPostSilences creates a new http.Handler for the post silences operation

func (*PostSilences) ServeHTTP

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

type PostSilencesBadRequest

type PostSilencesBadRequest struct {

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

PostSilencesBadRequest Bad request

swagger:response postSilencesBadRequest

func NewPostSilencesBadRequest

func NewPostSilencesBadRequest() *PostSilencesBadRequest

NewPostSilencesBadRequest creates PostSilencesBadRequest with default headers values

func (*PostSilencesBadRequest) SetPayload

func (o *PostSilencesBadRequest) SetPayload(payload string)

SetPayload sets the payload to the post silences bad request response

func (*PostSilencesBadRequest) WithPayload

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

WithPayload adds the payload to the post silences bad request response

func (*PostSilencesBadRequest) WriteResponse

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

WriteResponse to the client

type PostSilencesHandler

type PostSilencesHandler interface {
	Handle(PostSilencesParams) middleware.Responder
}

PostSilencesHandler interface for that can handle valid post silences params

type PostSilencesHandlerFunc

type PostSilencesHandlerFunc func(PostSilencesParams) middleware.Responder

PostSilencesHandlerFunc turns a function with the right signature into a post silences handler

func (PostSilencesHandlerFunc) Handle

Handle executing the request and returning a response

type PostSilencesNotFound added in v0.17.0

type PostSilencesNotFound struct {

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

PostSilencesNotFound A silence with the specified ID was not found

swagger:response postSilencesNotFound

func NewPostSilencesNotFound added in v0.17.0

func NewPostSilencesNotFound() *PostSilencesNotFound

NewPostSilencesNotFound creates PostSilencesNotFound with default headers values

func (*PostSilencesNotFound) SetPayload added in v0.17.0

func (o *PostSilencesNotFound) SetPayload(payload string)

SetPayload sets the payload to the post silences not found response

func (*PostSilencesNotFound) WithPayload added in v0.17.0

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

WithPayload adds the payload to the post silences not found response

func (*PostSilencesNotFound) WriteResponse added in v0.17.0

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

WriteResponse to the client

type PostSilencesOK

type PostSilencesOK struct {

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

PostSilencesOK Create / update silence response

swagger:response postSilencesOK

func NewPostSilencesOK

func NewPostSilencesOK() *PostSilencesOK

NewPostSilencesOK creates PostSilencesOK with default headers values

func (*PostSilencesOK) SetPayload

func (o *PostSilencesOK) SetPayload(payload *PostSilencesOKBody)

SetPayload sets the payload to the post silences o k response

func (*PostSilencesOK) WithPayload

func (o *PostSilencesOK) WithPayload(payload *PostSilencesOKBody) *PostSilencesOK

WithPayload adds the payload to the post silences o k response

func (*PostSilencesOK) WriteResponse

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

WriteResponse to the client

type PostSilencesOKBody

type PostSilencesOKBody struct {

	// silence ID
	SilenceID string `json:"silenceID,omitempty"`
}

PostSilencesOKBody post silences o k body

swagger:model PostSilencesOKBody

func (*PostSilencesOKBody) MarshalBinary

func (o *PostSilencesOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*PostSilencesOKBody) UnmarshalBinary

func (o *PostSilencesOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*PostSilencesOKBody) Validate

func (o *PostSilencesOKBody) Validate(formats strfmt.Registry) error

Validate validates this post silences o k body

type PostSilencesParams

type PostSilencesParams struct {

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

	/*The silence to create
	  Required: true
	  In: body
	*/
	Silence *models.PostableSilence
}

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

swagger:parameters postSilences

func NewPostSilencesParams

func NewPostSilencesParams() PostSilencesParams

NewPostSilencesParams creates a new PostSilencesParams object no default values defined in spec.

func (*PostSilencesParams) BindRequest

func (o *PostSilencesParams) 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 NewPostSilencesParams() beforehand.

type PostSilencesURL

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

PostSilencesURL generates an URL for the post silences operation

func (*PostSilencesURL) Build

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

Build a url path and query string

func (*PostSilencesURL) BuildFull

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

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

func (*PostSilencesURL) Must

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

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

func (*PostSilencesURL) SetBasePath

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

func (o *PostSilencesURL) String() string

String returns the string representation of the path with query string

func (*PostSilencesURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostSilencesURL) WithBasePath

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

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