alertconfig

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package alertconfig provides primitives to interact with the openapi HTTP API.

Code generated by github.com/do87/oapi-codegen version v0.5.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewListRequest

func NewListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewListRequest generates requests for List

func NewReceiversCreateRequest

func NewReceiversCreateRequest(ctx context.Context, server string, projectID string, instanceID string, body ReceiversCreateJSONRequestBody) (*http.Request, error)

NewReceiversCreateRequest calls the generic ReceiversCreate builder with application/json body

func NewReceiversCreateRequestWithBody

func NewReceiversCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewReceiversCreateRequestWithBody generates requests for ReceiversCreate with any type of body

func NewReceiversDeleteRequest

func NewReceiversDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewReceiversDeleteRequest generates requests for ReceiversDelete

func NewReceiversListRequest

func NewReceiversListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewReceiversListRequest generates requests for ReceiversList

func NewReceiversReadRequest

func NewReceiversReadRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewReceiversReadRequest generates requests for ReceiversRead

func NewReceiversUpdateRequest

func NewReceiversUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody) (*http.Request, error)

NewReceiversUpdateRequest calls the generic ReceiversUpdate builder with application/json body

func NewReceiversUpdateRequestWithBody

func NewReceiversUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, receiver string, contentType string, body io.Reader) (*http.Request, error)

NewReceiversUpdateRequestWithBody generates requests for ReceiversUpdate with any type of body

func NewRoutesCreateRequest

func NewRoutesCreateRequest(ctx context.Context, server string, projectID string, instanceID string, body RoutesCreateJSONRequestBody) (*http.Request, error)

NewRoutesCreateRequest calls the generic RoutesCreate builder with application/json body

func NewRoutesCreateRequestWithBody

func NewRoutesCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewRoutesCreateRequestWithBody generates requests for RoutesCreate with any type of body

func NewRoutesDeleteRequest

func NewRoutesDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewRoutesDeleteRequest generates requests for RoutesDelete

func NewRoutesListRequest

func NewRoutesListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewRoutesListRequest generates requests for RoutesList

func NewRoutesReadRequest

func NewRoutesReadRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string) (*http.Request, error)

NewRoutesReadRequest generates requests for RoutesRead

func NewRoutesUpdateRequest

func NewRoutesUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody) (*http.Request, error)

NewRoutesUpdateRequest calls the generic RoutesUpdate builder with application/json body

func NewRoutesUpdateRequestWithBody

func NewRoutesUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, receiver string, contentType string, body io.Reader) (*http.Request, error)

NewRoutesUpdateRequestWithBody generates requests for RoutesUpdate with any type of body

func NewUpdateRequest

func NewUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, body UpdateJSONRequestBody) (*http.Request, error)

NewUpdateRequest calls the generic Update builder with application/json body

func NewUpdateRequestWithBody

func NewUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateRequestWithBody generates requests for Update with any type of body

Types

type Alert

type Alert struct {
	Global       *Global         `json:"global,omitempty"`
	InhibitRules *[]InhibitRules `json:"inhibitRules,omitempty"`
	Receivers    []Receivers     `json:"receivers"`
	Route        Route           `json:"route"`
}

Alert defines model for Alert.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client common.Client
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, httpClient common.Client) *Client

Creates a new Client, with reasonable defaults

func (*Client) List

func (c *Client) List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversCreate

func (c *Client) ReceiversCreate(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversCreateWithBody

func (c *Client) ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversDelete

func (c *Client) ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversList

func (c *Client) ReceiversList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversRead

func (c *Client) ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversUpdate

func (c *Client) ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReceiversUpdateWithBody

func (c *Client) ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesCreate

func (c *Client) RoutesCreate(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesCreateWithBody

func (c *Client) RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesDelete

func (c *Client) RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesList

func (c *Client) RoutesList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesRead

func (c *Client) RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesUpdate

func (c *Client) RoutesUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RoutesUpdateWithBody

func (c *Client) RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateWithBody

func (c *Client) UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// List request
	List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Update request with any body
	UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReceiversList request
	ReceiversList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReceiversCreate request with any body
	ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ReceiversCreate(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReceiversDelete request
	ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReceiversRead request
	ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReceiversUpdate request with any body
	ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RoutesList request
	RoutesList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RoutesCreate request with any body
	RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RoutesCreate(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RoutesDelete request
	RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RoutesRead request
	RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RoutesUpdate request with any body
	RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RoutesUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, httpClient common.Client) *ClientWithResponses

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) ListWithResponse

func (c *ClientWithResponses) ListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error)

ListWithResponse request returning *ListResponse

func (*ClientWithResponses) ParseListResponse

func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)

ParseListResponse parses an HTTP response from a ListWithResponse call

func (*ClientWithResponses) ParseReceiversCreateResponse

func (c *ClientWithResponses) ParseReceiversCreateResponse(rsp *http.Response) (*ReceiversCreateResponse, error)

ParseReceiversCreateResponse parses an HTTP response from a ReceiversCreateWithResponse call

func (*ClientWithResponses) ParseReceiversDeleteResponse

func (c *ClientWithResponses) ParseReceiversDeleteResponse(rsp *http.Response) (*ReceiversDeleteResponse, error)

ParseReceiversDeleteResponse parses an HTTP response from a ReceiversDeleteWithResponse call

func (*ClientWithResponses) ParseReceiversListResponse

func (c *ClientWithResponses) ParseReceiversListResponse(rsp *http.Response) (*ReceiversListResponse, error)

ParseReceiversListResponse parses an HTTP response from a ReceiversListWithResponse call

func (*ClientWithResponses) ParseReceiversReadResponse

func (c *ClientWithResponses) ParseReceiversReadResponse(rsp *http.Response) (*ReceiversReadResponse, error)

ParseReceiversReadResponse parses an HTTP response from a ReceiversReadWithResponse call

func (*ClientWithResponses) ParseReceiversUpdateResponse

func (c *ClientWithResponses) ParseReceiversUpdateResponse(rsp *http.Response) (*ReceiversUpdateResponse, error)

ParseReceiversUpdateResponse parses an HTTP response from a ReceiversUpdateWithResponse call

func (*ClientWithResponses) ParseRoutesCreateResponse

func (c *ClientWithResponses) ParseRoutesCreateResponse(rsp *http.Response) (*RoutesCreateResponse, error)

ParseRoutesCreateResponse parses an HTTP response from a RoutesCreateWithResponse call

func (*ClientWithResponses) ParseRoutesDeleteResponse

func (c *ClientWithResponses) ParseRoutesDeleteResponse(rsp *http.Response) (*RoutesDeleteResponse, error)

ParseRoutesDeleteResponse parses an HTTP response from a RoutesDeleteWithResponse call

func (*ClientWithResponses) ParseRoutesListResponse

func (c *ClientWithResponses) ParseRoutesListResponse(rsp *http.Response) (*RoutesListResponse, error)

ParseRoutesListResponse parses an HTTP response from a RoutesListWithResponse call

func (*ClientWithResponses) ParseRoutesReadResponse

func (c *ClientWithResponses) ParseRoutesReadResponse(rsp *http.Response) (*RoutesReadResponse, error)

ParseRoutesReadResponse parses an HTTP response from a RoutesReadWithResponse call

func (*ClientWithResponses) ParseRoutesUpdateResponse

func (c *ClientWithResponses) ParseRoutesUpdateResponse(rsp *http.Response) (*RoutesUpdateResponse, error)

ParseRoutesUpdateResponse parses an HTTP response from a RoutesUpdateWithResponse call

func (*ClientWithResponses) ParseUpdateResponse

func (c *ClientWithResponses) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)

ParseUpdateResponse parses an HTTP response from a UpdateWithResponse call

func (*ClientWithResponses) ReceiversCreateWithBodyWithResponse

func (c *ClientWithResponses) ReceiversCreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

ReceiversCreateWithBodyWithResponse request with arbitrary body returning *ReceiversCreateResponse

func (*ClientWithResponses) ReceiversCreateWithResponse

func (c *ClientWithResponses) ReceiversCreateWithResponse(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

func (*ClientWithResponses) ReceiversDeleteWithResponse

func (c *ClientWithResponses) ReceiversDeleteWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversDeleteResponse, error)

ReceiversDeleteWithResponse request returning *ReceiversDeleteResponse

func (*ClientWithResponses) ReceiversListWithResponse

func (c *ClientWithResponses) ReceiversListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ReceiversListResponse, error)

ReceiversListWithResponse request returning *ReceiversListResponse

func (*ClientWithResponses) ReceiversReadWithResponse

func (c *ClientWithResponses) ReceiversReadWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversReadResponse, error)

ReceiversReadWithResponse request returning *ReceiversReadResponse

func (*ClientWithResponses) ReceiversUpdateWithBodyWithResponse

func (c *ClientWithResponses) ReceiversUpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

ReceiversUpdateWithBodyWithResponse request with arbitrary body returning *ReceiversUpdateResponse

func (*ClientWithResponses) ReceiversUpdateWithResponse

func (c *ClientWithResponses) ReceiversUpdateWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

func (*ClientWithResponses) RoutesCreateWithBodyWithResponse

func (c *ClientWithResponses) RoutesCreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

RoutesCreateWithBodyWithResponse request with arbitrary body returning *RoutesCreateResponse

func (*ClientWithResponses) RoutesCreateWithResponse

func (c *ClientWithResponses) RoutesCreateWithResponse(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

func (*ClientWithResponses) RoutesDeleteWithResponse

func (c *ClientWithResponses) RoutesDeleteWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesDeleteResponse, error)

RoutesDeleteWithResponse request returning *RoutesDeleteResponse

func (*ClientWithResponses) RoutesListWithResponse

func (c *ClientWithResponses) RoutesListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RoutesListResponse, error)

RoutesListWithResponse request returning *RoutesListResponse

func (*ClientWithResponses) RoutesReadWithResponse

func (c *ClientWithResponses) RoutesReadWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesReadResponse, error)

RoutesReadWithResponse request returning *RoutesReadResponse

func (*ClientWithResponses) RoutesUpdateWithBodyWithResponse

func (c *ClientWithResponses) RoutesUpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)

RoutesUpdateWithBodyWithResponse request with arbitrary body returning *RoutesUpdateResponse

func (*ClientWithResponses) RoutesUpdateWithResponse

func (c *ClientWithResponses) RoutesUpdateWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)

func (*ClientWithResponses) UpdateWithBodyWithResponse

func (c *ClientWithResponses) UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

UpdateWithBodyWithResponse request with arbitrary body returning *UpdateResponse

func (*ClientWithResponses) UpdateWithResponse

func (c *ClientWithResponses) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// List request
	ListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error)

	// Update request with any body
	UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

	UpdateWithResponse(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)

	// ReceiversList request
	ReceiversListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ReceiversListResponse, error)

	// ReceiversCreate request with any body
	ReceiversCreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

	ReceiversCreateWithResponse(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)

	// ReceiversDelete request
	ReceiversDeleteWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversDeleteResponse, error)

	// ReceiversRead request
	ReceiversReadWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversReadResponse, error)

	// ReceiversUpdate request with any body
	ReceiversUpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

	ReceiversUpdateWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)

	// RoutesList request
	RoutesListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RoutesListResponse, error)

	// RoutesCreate request with any body
	RoutesCreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

	RoutesCreateWithResponse(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)

	// RoutesDelete request
	RoutesDeleteWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesDeleteResponse, error)

	// RoutesRead request
	RoutesReadWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesReadResponse, error)

	// RoutesUpdate request with any body
	RoutesUpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)

	RoutesUpdateWithResponse(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type EmailConfig

type EmailConfig struct {
	AuthIdentity *openapi_types.Email `json:"authIdentity,omitempty"`
	AuthPassword *string              `json:"authPassword,omitempty"`
	AuthUsername *string              `json:"authUsername,omitempty"`
	From         *openapi_types.Email `json:"from,omitempty"`
	SendResolved *bool                `json:"sendResolved,omitempty"`
	Smarthost    *string              `json:"smarthost,omitempty"`
	To           openapi_types.Email  `json:"to"`
}

EmailConfig defines model for EmailConfig.

type Error

type Error struct {
	Errors  *[]map[string]string `json:"errors,omitempty"`
	Message string               `json:"message"`
}

Error defines model for Error.

type GetAlert

type GetAlert struct {
	Data    Alert  `json:"data"`
	Message string `json:"message"`
}

GetAlert defines model for GetAlert.

type Global

type Global struct {
	OpsgenieAPIKey   *string              `json:"opsgenieApiKey,omitempty"`
	OpsgenieAPIURL   *string              `json:"opsgenieApiUrl,omitempty"`
	ResolveTimeout   *string              `json:"resolveTimeout,omitempty"`
	SmtpAuthIdentity *openapi_types.Email `json:"smtpAuthIdentity,omitempty"`
	SmtpAuthPassword *string              `json:"smtpAuthPassword,omitempty"`
	SmtpAuthUsername *string              `json:"smtpAuthUsername,omitempty"`
	SmtpFrom         *openapi_types.Email `json:"smtpFrom,omitempty"`
	SmtpSmarthost    *string              `json:"smtpSmarthost,omitempty"`
}

Global defines model for Global.

type InhibitRules

type InhibitRules struct {
	Equal          *[]string          `json:"equal,omitempty"`
	SourceMatch    *map[string]string `json:"sourceMatch,omitempty"`
	SourceMatchRe  *map[string]string `json:"sourceMatchRe,omitempty"`
	SourceMatchers *[]string          `json:"sourceMatchers,omitempty"`
	TargetMatch    *map[string]string `json:"targetMatch,omitempty"`
	TargetMatchRe  *map[string]string `json:"targetMatchRe,omitempty"`
	TargetMatchers *[]string          `json:"targetMatchers,omitempty"`
}

InhibitRules defines model for InhibitRules.

type ListResponse

type ListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetAlert
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (ListResponse) Status

func (r ListResponse) Status() string

Status returns HTTPResponse.Status

func (ListResponse) StatusCode

func (r ListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Message

type Message struct {
	Message string `json:"message"`
}

Message defines model for Message.

type OpsgenieConfig

type OpsgenieConfig struct {
	APIKey       *string `json:"apiKey,omitempty"`
	APIURL       *string `json:"apiUrl,omitempty"`
	Priority     *string `json:"priority,omitempty"`
	SendResolved *bool   `json:"sendResolved,omitempty"`
	Tags         *string `json:"tags,omitempty"`
}

OpsgenieConfig defines model for OpsgenieConfig.

type PermissionDenied

type PermissionDenied struct {
	Detail string `json:"detail"`
}

PermissionDenied defines model for PermissionDenied.

type PutAlert

type PutAlert struct {
	Data    Alert  `json:"data"`
	Message string `json:"message"`
}

PutAlert defines model for PutAlert.

type Receivers

type Receivers struct {
	EmailConfigs    *[]EmailConfig    `json:"emailConfigs,omitempty"`
	Name            string            `json:"name"`
	OpsgenieConfigs *[]OpsgenieConfig `json:"opsgenieConfigs,omitempty"`
	WebHookConfigs  *[]WebHook        `json:"webHookConfigs,omitempty"`
}

Receivers defines model for Receivers.

type ReceiversCreateJSONBody

type ReceiversCreateJSONBody struct {
	// EmailConfigs Email configurations
	EmailConfigs *[]struct {
		// AuthIdentity SMTP authentication information.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		AuthIdentity *string `json:"authIdentity,omitempty"`

		// AuthPassword SMTP authentication information.
		AuthPassword *string `json:"authPassword,omitempty"`

		// AuthUsername SMTP authentication information.
		AuthUsername *string `json:"authUsername,omitempty"`

		// From The sender address.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		From *string `json:"from,omitempty"`

		// Smarthost The SMTP host through which emails are sent.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		Smarthost *string `json:"smarthost,omitempty"`

		// To The email address to send notifications to.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		To *string `json:"to,omitempty"`
	} `json:"emailConfigs,omitempty"`

	// Name `Additional Validators:`
	// * must be unique
	// * should only include the characters: a-zA-Z0-9-
	Name string `json:"name"`

	// OpsgenieConfigs Configuration for ops genie.
	OpsgenieConfigs *[]struct {
		// ApiKey The API key to use when talking to the OpsGenie API.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9-
		APIKey *string `json:"apiKey,omitempty"`

		// ApiUrl The host to send OpsGenie API requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		APIURL *string `json:"apiUrl,omitempty"`

		// Tags Comma separated list of tags attached to the notifications.
		Tags *string `json:"tags,omitempty"`
	} `json:"opsgenieConfigs,omitempty"`
	WebHookConfigs *[]struct {
		// MsTeams Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such
		MsTeams *bool `json:"msTeams,omitempty"`

		// Url The endpoint to send HTTP POST requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		URL *string `json:"url,omitempty"`
	} `json:"webHookConfigs,omitempty"`
}

ReceiversCreateJSONBody defines parameters for ReceiversCreate.

type ReceiversCreateJSONRequestBody

type ReceiversCreateJSONRequestBody ReceiversCreateJSONBody

ReceiversCreateJSONRequestBody defines body for ReceiversCreate for application/json ContentType.

type ReceiversCreateResponse

type ReceiversCreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ReceiversResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (ReceiversCreateResponse) Status

func (r ReceiversCreateResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversCreateResponse) StatusCode

func (r ReceiversCreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversDeleteResponse

type ReceiversDeleteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ReceiversResponse
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (ReceiversDeleteResponse) Status

func (r ReceiversDeleteResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversDeleteResponse) StatusCode

func (r ReceiversDeleteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversListResponse

type ReceiversListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReceiversResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (ReceiversListResponse) Status

func (r ReceiversListResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversListResponse) StatusCode

func (r ReceiversListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversReadResponse

type ReceiversReadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ReceiversResponseSerializerSingle
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (ReceiversReadResponse) Status

func (r ReceiversReadResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversReadResponse) StatusCode

func (r ReceiversReadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiversResponse

type ReceiversResponse struct {
	Data    []Receivers `json:"data"`
	Message string      `json:"message"`
}

ReceiversResponse defines model for ReceiversResponse.

type ReceiversResponseSerializerSingle

type ReceiversResponseSerializerSingle struct {
	Data    Receivers `json:"data"`
	Message string    `json:"message"`
}

ReceiversResponseSerializerSingle defines model for ReceiversResponseSerializerSingle.

type ReceiversUpdateJSONBody

type ReceiversUpdateJSONBody struct {
	// EmailConfigs Email configurations
	EmailConfigs *[]struct {
		// AuthIdentity SMTP authentication information.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		AuthIdentity *string `json:"authIdentity,omitempty"`

		// AuthPassword SMTP authentication information.
		AuthPassword *string `json:"authPassword,omitempty"`

		// AuthUsername SMTP authentication information.
		AuthUsername *string `json:"authUsername,omitempty"`

		// From The sender address.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		From *string `json:"from,omitempty"`

		// Smarthost The SMTP host through which emails are sent.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		Smarthost *string `json:"smarthost,omitempty"`

		// To The email address to send notifications to.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		To *string `json:"to,omitempty"`
	} `json:"emailConfigs,omitempty"`

	// Name `Additional Validators:`
	// * must be unique
	// * should only include the characters: a-zA-Z0-9-
	Name string `json:"name"`

	// OpsgenieConfigs Configuration for ops genie.
	OpsgenieConfigs *[]struct {
		// ApiKey The API key to use when talking to the OpsGenie API.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9-
		APIKey *string `json:"apiKey,omitempty"`

		// ApiUrl The host to send OpsGenie API requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		APIURL *string `json:"apiUrl,omitempty"`

		// Tags Comma separated list of tags attached to the notifications.
		Tags *string `json:"tags,omitempty"`
	} `json:"opsgenieConfigs,omitempty"`
	WebHookConfigs *[]struct {
		// MsTeams Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such
		MsTeams *bool `json:"msTeams,omitempty"`

		// Url The endpoint to send HTTP POST requests to.
		// `Additional Validators:`
		// * must be a syntactically valid url address
		URL *string `json:"url,omitempty"`
	} `json:"webHookConfigs,omitempty"`
}

ReceiversUpdateJSONBody defines parameters for ReceiversUpdate.

type ReceiversUpdateJSONRequestBody

type ReceiversUpdateJSONRequestBody ReceiversUpdateJSONBody

ReceiversUpdateJSONRequestBody defines body for ReceiversUpdate for application/json ContentType.

type ReceiversUpdateResponse

type ReceiversUpdateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *ReceiversResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (ReceiversUpdateResponse) Status

func (r ReceiversUpdateResponse) Status() string

Status returns HTTPResponse.Status

func (ReceiversUpdateResponse) StatusCode

func (r ReceiversUpdateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Route

type Route struct {
	Continue       *bool               `json:"continue,omitempty"`
	GroupBy        *[]string           `json:"groupBy,omitempty"`
	GroupInterval  *string             `json:"groupInterval,omitempty"`
	GroupWait      *string             `json:"groupWait,omitempty"`
	Match          *map[string]string  `json:"match,omitempty"`
	MatchRe        *map[string]string  `json:"matchRe,omitempty"`
	Receiver       string              `json:"receiver"`
	RepeatInterval *string             `json:"repeatInterval,omitempty"`
	Routes         *[]RouteSerializer2 `json:"routes,omitempty"`
}

Route defines model for Route.

type RouteResponse

type RouteResponse struct {
	Data    Route  `json:"data"`
	Message string `json:"message"`
}

RouteResponse defines model for RouteResponse.

type RouteSerializer2

type RouteSerializer2 struct {
	Continue       *bool                `json:"continue,omitempty"`
	GroupBy        *[]string            `json:"groupBy,omitempty"`
	GroupInterval  *string              `json:"groupInterval,omitempty"`
	GroupWait      *string              `json:"groupWait,omitempty"`
	Match          *map[string]string   `json:"match,omitempty"`
	MatchRe        *map[string]string   `json:"matchRe,omitempty"`
	Matchers       *[]string            `json:"matchers,omitempty"`
	Receiver       string               `json:"receiver"`
	RepeatInterval *string              `json:"repeatInterval,omitempty"`
	Routes         *[]map[string]string `json:"routes,omitempty"`
}

RouteSerializer2 defines model for RouteSerializer2.

type RoutesCreateJSONBody

type RoutesCreateJSONBody struct {
	// GroupBy The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
	GroupBy *[]string `json:"groupBy,omitempty"`

	// GroupInterval How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupInterval *string `json:"groupInterval,omitempty"`

	// GroupWait How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupWait *string `json:"groupWait,omitempty"`

	// Match map of key:value. A set of equality matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	// * key and values should only include the characters: a-zA-Z0-9_./@&?:-
	Match *map[string]interface{} `json:"match,omitempty"`

	// MatchRe map of key:value. A set of regex-matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

	// Matchers A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:
	// * A valid Prometheus label name.
	// * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.
	// * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	Matchers *[]string `json:"matchers,omitempty"`

	// Receiver Receiver that should be one item of receivers
	// `Additional Validators:`
	// * must be a in name of receivers
	Receiver string `json:"receiver"`

	// RepeatInterval How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
	// `Additional Validators:`
	// * must be a valid time format
	RepeatInterval *string `json:"repeatInterval,omitempty"`

	// Routes Zero or more child routes.
	Routes *[]struct {
		GroupBy *[]string `json:"groupBy,omitempty"`

		// GroupInterval As in one level above
		GroupInterval *string `json:"groupInterval,omitempty"`

		// GroupWait As in one level above
		GroupWait *string `json:"groupWait,omitempty"`

		// Match As in one level above
		Match *map[string]interface{} `json:"match,omitempty"`

		// MatchRe As in one level above
		MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

		// Receiver As in one level above
		Receiver *string `json:"receiver,omitempty"`

		// RepeatInterval As in one level above
		RepeatInterval *string `json:"repeatInterval,omitempty"`

		// Routes Another child routes
		Routes *[]map[string]interface{} `json:"routes,omitempty"`
	} `json:"routes,omitempty"`
}

RoutesCreateJSONBody defines parameters for RoutesCreate.

type RoutesCreateJSONRequestBody

type RoutesCreateJSONRequestBody RoutesCreateJSONBody

RoutesCreateJSONRequestBody defines body for RoutesCreate for application/json ContentType.

type RoutesCreateResponse

type RoutesCreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *RouteResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RoutesCreateResponse) Status

func (r RoutesCreateResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesCreateResponse) StatusCode

func (r RoutesCreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesDeleteResponse

type RoutesDeleteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *RouteResponse
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (RoutesDeleteResponse) Status

func (r RoutesDeleteResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesDeleteResponse) StatusCode

func (r RoutesDeleteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesListResponse

type RoutesListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RouteResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RoutesListResponse) Status

func (r RoutesListResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesListResponse) StatusCode

func (r RoutesListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesReadResponse

type RoutesReadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RouteResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RoutesReadResponse) Status

func (r RoutesReadResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesReadResponse) StatusCode

func (r RoutesReadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RoutesUpdateJSONBody

type RoutesUpdateJSONBody struct {
	// GroupBy The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
	GroupBy *[]string `json:"groupBy,omitempty"`

	// GroupInterval How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupInterval *string `json:"groupInterval,omitempty"`

	// GroupWait How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
	// `Additional Validators:`
	// * must be a valid time format
	GroupWait *string `json:"groupWait,omitempty"`

	// Match map of key:value. A set of equality matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	// * key and values should only include the characters: a-zA-Z0-9_./@&?:-
	Match *map[string]interface{} `json:"match,omitempty"`

	// MatchRe map of key:value. A set of regex-matchers an alert has to fulfill to match the node.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

	// Matchers A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:
	// * A valid Prometheus label name.
	// * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.
	// * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.
	// `Additional Validators:`
	// * should not contain more than 5 keys
	// * each key and value should not be longer than 200 characters
	Matchers *[]string `json:"matchers,omitempty"`

	// Receiver Receiver that should be one item of receivers
	// `Additional Validators:`
	// * must be a in name of receivers
	Receiver string `json:"receiver"`

	// RepeatInterval How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
	// `Additional Validators:`
	// * must be a valid time format
	RepeatInterval *string `json:"repeatInterval,omitempty"`

	// Routes Zero or more child routes.
	Routes *[]struct {
		GroupBy *[]string `json:"groupBy,omitempty"`

		// GroupInterval As in one level above
		GroupInterval *string `json:"groupInterval,omitempty"`

		// GroupWait As in one level above
		GroupWait *string `json:"groupWait,omitempty"`

		// Match As in one level above
		Match *map[string]interface{} `json:"match,omitempty"`

		// MatchRe As in one level above
		MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

		// Receiver As in one level above
		Receiver *string `json:"receiver,omitempty"`

		// RepeatInterval As in one level above
		RepeatInterval *string `json:"repeatInterval,omitempty"`

		// Routes Another child routes
		Routes *[]map[string]interface{} `json:"routes,omitempty"`
	} `json:"routes,omitempty"`
}

RoutesUpdateJSONBody defines parameters for RoutesUpdate.

type RoutesUpdateJSONRequestBody

type RoutesUpdateJSONRequestBody RoutesUpdateJSONBody

RoutesUpdateJSONRequestBody defines body for RoutesUpdate for application/json ContentType.

type RoutesUpdateResponse

type RoutesUpdateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *RouteResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (RoutesUpdateResponse) Status

func (r RoutesUpdateResponse) Status() string

Status returns HTTPResponse.Status

func (RoutesUpdateResponse) StatusCode

func (r RoutesUpdateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateJSONBody

type UpdateJSONBody struct {
	// Global Global config. If nothing passed the default argus config will be used.
	Global *struct {
		// OpsgenieApiKey Opsgenie api key
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9-
		OpsgenieAPIKey *string `json:"opsgenieApiKey,omitempty"`

		// OpsgenieApiUrl Opsgenie api url
		// `Additional Validators:`
		// * must be a syntactically valid url address
		OpsgenieAPIURL *string `json:"opsgenieApiUrl,omitempty"`

		// ResolveTimeout ResolveTimeout is the default value used by alertmanager if the alert does not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. This has no impact on alerts from Prometheus, as they always include EndsAt.
		// `Additional Validators:`
		// * must be a valid time format
		ResolveTimeout *string `json:"resolveTimeout,omitempty"`

		// SmtpAuthIdentity Auth identity.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		SmtpAuthIdentity *string `json:"smtpAuthIdentity,omitempty"`

		// SmtpAuthPassword SMTP Auth using LOGIN and PLAIN.
		SmtpAuthPassword *string `json:"smtpAuthPassword,omitempty"`

		// SmtpAuthUsername SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn't authenticate to the SMTP server.
		SmtpAuthUsername *string `json:"smtpAuthUsername,omitempty"`

		// SmtpFrom The default SMTP From header field.
		// `Additional Validators:`
		// * must be a syntactically valid email address
		SmtpFrom *string `json:"smtpFrom,omitempty"`

		// SmtpSmarthost The default SMTP smarthost used for sending emails, including port number. Port number usually is 25, or 587 for SMTP over TLS (sometimes referred to as STARTTLS). Example: smtp.example.org:587
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		SmtpSmarthost *string `json:"smtpSmarthost,omitempty"`
	} `json:"global,omitempty"`

	// InhibitRules A list of inhibition rules.
	InhibitRules *struct {
		// Equal Labels that must have an equal value in the source and target alert for the inhibition to take effect.
		// `Additional Validators:`
		// * should only include the characters: a-zA-Z0-9_./@&?:-
		Equal *[]string `json:"equal,omitempty"`

		// SourceMatch map of key:value. Matchers for which one or more alerts have to exist for the inhibition to take effect.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		// * each key and value should only include the characters: a-zA-Z0-9_./@&?:-
		SourceMatch *map[string]interface{} `json:"sourceMatch,omitempty"`

		// SourceMatchRe map of key:value. Regex match
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		SourceMatchRe *map[string]interface{} `json:"sourceMatchRe,omitempty"`

		// TargetMatch map of key:value. Matchers that have to be fulfilled in the alerts to be muted.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		// * each key and value should only include the characters: a-zA-Z0-9_./@&?:-
		TargetMatch *map[string]interface{} `json:"targetMatch,omitempty"`

		// TargetMatchRe map of key:value. Matchers that have to be fulfilled in the alerts to be muted. Regex.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not have more than 200 characters
		TargetMatchRe *map[string]interface{} `json:"targetMatchRe,omitempty"`
	} `json:"inhibitRules,omitempty"`

	// Receivers A list of notification receivers.
	Receivers []struct {
		// EmailConfigs Email configurations
		EmailConfigs *[]struct {
			// AuthIdentity SMTP authentication information.
			// `Additional Validators:`
			// * must be a syntactically valid email address
			AuthIdentity *string `json:"authIdentity,omitempty"`

			// AuthPassword SMTP authentication information.
			AuthPassword *string `json:"authPassword,omitempty"`

			// AuthUsername SMTP authentication information.
			AuthUsername *string `json:"authUsername,omitempty"`

			// From The sender address.
			// `Additional Validators:`
			// * must be a syntactically valid email address
			From *string `json:"from,omitempty"`

			// Smarthost The SMTP host through which emails are sent.
			// `Additional Validators:`
			// * should only include the characters: a-zA-Z0-9_./@&?:-
			Smarthost *string `json:"smarthost,omitempty"`

			// To The email address to send notifications to.
			// `Additional Validators:`
			// * must be a syntactically valid email address
			To *string `json:"to,omitempty"`
		} `json:"emailConfigs,omitempty"`

		// Name `Additional Validators:`
		// * must be unique
		// * should only include the characters: a-zA-Z0-9-
		Name string `json:"name"`

		// OpsgenieConfigs Configuration for ops genie.
		OpsgenieConfigs *[]struct {
			// ApiKey The API key to use when talking to the OpsGenie API.
			// `Additional Validators:`
			// * should only include the characters: a-zA-Z0-9-
			APIKey *string `json:"apiKey,omitempty"`

			// ApiUrl The host to send OpsGenie API requests to.
			// `Additional Validators:`
			// * must be a syntactically valid url address
			APIURL *string `json:"apiUrl,omitempty"`

			// Tags Comma separated list of tags attached to the notifications.
			Tags *string `json:"tags,omitempty"`
		} `json:"opsgenieConfigs,omitempty"`
		WebHookConfigs *[]struct {
			// MsTeams Microsoft Teams webhooks require special handling. If you set this property to true, it is treated as such
			MsTeams *bool `json:"msTeams,omitempty"`

			// Url The endpoint to send HTTP POST requests to.
			// `Additional Validators:`
			// * must be a syntactically valid url address
			URL *string `json:"url,omitempty"`
		} `json:"webHookConfigs,omitempty"`
	} `json:"receivers"`

	// Route The root node of the routing tree.
	Route struct {
		// GroupBy The labels by which incoming alerts are grouped together. For example, multiple alerts coming in for cluster=A and alertname=LatencyHigh would be batched into a single group. To aggregate by all possible labels use the special value '...' as the sole label name, for example: group_by: ['...']. This effectively disables aggregation entirely, passing through all alerts as-is. This is unlikely to be what you want, unless you have a very low alert volume or your upstream notification system performs its own grouping.
		GroupBy *[]string `json:"groupBy,omitempty"`

		// GroupInterval How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent. (Usually ~5m or more.)
		// `Additional Validators:`
		// * must be a valid time format
		GroupInterval *string `json:"groupInterval,omitempty"`

		// GroupWait How long to initially wait to send a notification for a group of alerts. Allows to wait for an inhibiting alert to arrive or collect more initial alerts for the same group. (Usually ~0s to few minutes.)
		// `Additional Validators:`
		// * must be a valid time format
		GroupWait *string `json:"groupWait,omitempty"`

		// Match map of key:value. A set of equality matchers an alert has to fulfill to match the node.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not be longer than 200 characters
		// * key and values should only include the characters: a-zA-Z0-9_./@&?:-
		Match *map[string]interface{} `json:"match,omitempty"`

		// MatchRe map of key:value. A set of regex-matchers an alert has to fulfill to match the node.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not be longer than 200 characters
		MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

		// Matchers A list of matchers that an alert has to fulfill to match the node. A matcher is a string with a syntax inspired by PromQL and OpenMetrics. The syntax of a matcher consists of three tokens:
		// * A valid Prometheus label name.
		// * One of =, !=, =~, or !~. = means equals, != means that the strings are not equal, =~ is used for equality of regex expressions and !~ is used for un-equality of regex expressions. They have the same meaning as known from PromQL selectors.
		// * A UTF-8 string, which may be enclosed in double quotes. Before or after each token, there may be any amount of whitespace.
		// `Additional Validators:`
		// * should not contain more than 5 keys
		// * each key and value should not be longer than 200 characters
		Matchers *[]string `json:"matchers,omitempty"`

		// Receiver Receiver that should be one item of receivers
		// `Additional Validators:`
		// * must be a in name of receivers
		Receiver string `json:"receiver"`

		// RepeatInterval How long to wait before sending a notification again if it has already been sent successfully for an alert. (Usually ~3h or more).
		// `Additional Validators:`
		// * must be a valid time format
		RepeatInterval *string `json:"repeatInterval,omitempty"`

		// Routes Zero or more child routes.
		Routes *[]struct {
			GroupBy *[]string `json:"groupBy,omitempty"`

			// GroupInterval As in one level above
			GroupInterval *string `json:"groupInterval,omitempty"`

			// GroupWait As in one level above
			GroupWait *string `json:"groupWait,omitempty"`

			// Match As in one level above
			Match *map[string]interface{} `json:"match,omitempty"`

			// MatchRe As in one level above
			MatchRe *map[string]interface{} `json:"matchRe,omitempty"`

			// Receiver As in one level above
			Receiver *string `json:"receiver,omitempty"`

			// RepeatInterval As in one level above
			RepeatInterval *string `json:"repeatInterval,omitempty"`

			// Routes Another child routes
			Routes *[]map[string]interface{} `json:"routes,omitempty"`
		} `json:"routes,omitempty"`
	} `json:"route"`
}

UpdateJSONBody defines parameters for Update.

type UpdateJSONRequestBody

type UpdateJSONRequestBody UpdateJSONBody

UpdateJSONRequestBody defines body for Update for application/json ContentType.

type UpdateResponse

type UpdateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *PutAlert
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (UpdateResponse) Status

func (r UpdateResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateResponse) StatusCode

func (r UpdateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type WebHook

type WebHook struct {
	MsTeams      *bool  `json:"msTeams,omitempty"`
	SendResolved *bool  `json:"sendResolved,omitempty"`
	URL          string `json:"url"`
}

WebHook defines model for WebHook.

Jump to

Keyboard shortcuts

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