Documentation
¶
Overview ¶
Package alertconfig provides primitives to interact with the openapi HTTP API.
Code generated by dev.azure.com/schwarzit/schwarzit.odj.core/_git/stackit-client-generator.git version v1.0.23 DO NOT EDIT.
Index ¶
- Constants
- func NewListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewReceiversCreateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewReceiversCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewReceiversDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewReceiversListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewReceiversReadRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewReceiversUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewReceiversUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewRoutesCreateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewRoutesCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewRoutesDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewRoutesListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewRoutesReadRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewRoutesUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewRoutesUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- type Alert
- type Client
- func (c *Client[K]) ListRaw(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversCreateRaw(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversCreateRawWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversDeleteRaw(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversListRaw(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversReadRaw(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversUpdateRaw(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) ReceiversUpdateRawWithBody(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesCreateRaw(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesCreateRawWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesDeleteRaw(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesListRaw(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesReadRaw(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesUpdateRaw(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) RoutesUpdateRawWithBody(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*http.Response, error)
- func (c *Client[K]) UpdateRaw(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client[K]) UpdateRawWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- type ClientWithResponses
- func (c *ClientWithResponses[K]) List(ctx context.Context, projectID string, instanceID string, ...) (*ListResponse, error)
- func (c *ClientWithResponses[K]) ParseListResponse(rsp *http.Response) (*ListResponse, error)
- func (c *ClientWithResponses[K]) ParseReceiversCreateResponse(rsp *http.Response) (*ReceiversCreateResponse, error)
- func (c *ClientWithResponses[K]) ParseReceiversDeleteResponse(rsp *http.Response) (*ReceiversDeleteResponse, error)
- func (c *ClientWithResponses[K]) ParseReceiversListResponse(rsp *http.Response) (*ReceiversListResponse, error)
- func (c *ClientWithResponses[K]) ParseReceiversReadResponse(rsp *http.Response) (*ReceiversReadResponse, error)
- func (c *ClientWithResponses[K]) ParseReceiversUpdateResponse(rsp *http.Response) (*ReceiversUpdateResponse, error)
- func (c *ClientWithResponses[K]) ParseRoutesCreateResponse(rsp *http.Response) (*RoutesCreateResponse, error)
- func (c *ClientWithResponses[K]) ParseRoutesDeleteResponse(rsp *http.Response) (*RoutesDeleteResponse, error)
- func (c *ClientWithResponses[K]) ParseRoutesListResponse(rsp *http.Response) (*RoutesListResponse, error)
- func (c *ClientWithResponses[K]) ParseRoutesReadResponse(rsp *http.Response) (*RoutesReadResponse, error)
- func (c *ClientWithResponses[K]) ParseRoutesUpdateResponse(rsp *http.Response) (*RoutesUpdateResponse, error)
- func (c *ClientWithResponses[K]) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)
- func (c *ClientWithResponses[K]) ReceiversCreate(ctx context.Context, projectID string, instanceID string, ...) (*ReceiversCreateResponse, error)
- func (c *ClientWithResponses[K]) ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*ReceiversCreateResponse, error)
- func (c *ClientWithResponses[K]) ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*ReceiversDeleteResponse, error)
- func (c *ClientWithResponses[K]) ReceiversList(ctx context.Context, projectID string, instanceID string, ...) (*ReceiversListResponse, error)
- func (c *ClientWithResponses[K]) ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*ReceiversReadResponse, error)
- func (c *ClientWithResponses[K]) ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*ReceiversUpdateResponse, error)
- func (c *ClientWithResponses[K]) ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*ReceiversUpdateResponse, error)
- func (c *ClientWithResponses[K]) RoutesCreate(ctx context.Context, projectID string, instanceID string, ...) (*RoutesCreateResponse, error)
- func (c *ClientWithResponses[K]) RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*RoutesCreateResponse, error)
- func (c *ClientWithResponses[K]) RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*RoutesDeleteResponse, error)
- func (c *ClientWithResponses[K]) RoutesList(ctx context.Context, projectID string, instanceID string, ...) (*RoutesListResponse, error)
- func (c *ClientWithResponses[K]) RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*RoutesReadResponse, error)
- func (c *ClientWithResponses[K]) RoutesUpdate(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*RoutesUpdateResponse, error)
- func (c *ClientWithResponses[K]) RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, ...) (*RoutesUpdateResponse, error)
- func (c *ClientWithResponses[K]) Update(ctx context.Context, projectID string, instanceID string, ...) (*UpdateResponse, error)
- func (c *ClientWithResponses[K]) UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*UpdateResponse, error)
- type ClientWithResponsesInterface
- type EmailConfig
- type Error
- type GetAlert
- type Global
- type InhibitRules
- type ListResponse
- type Message
- type OpsgenieConfig
- type PermissionDenied
- type PutAlert
- type Receivers
- type ReceiversCreateJSONBody
- type ReceiversCreateJSONRequestBody
- type ReceiversCreateResponse
- type ReceiversDeleteResponse
- type ReceiversListResponse
- type ReceiversReadResponse
- type ReceiversResponse
- type ReceiversResponseSerializerSingle
- type ReceiversUpdateJSONBody
- type ReceiversUpdateJSONRequestBody
- type ReceiversUpdateResponse
- type RequestEditorFn
- type Route
- type RouteResponse
- type RouteSerializer2
- type RoutesCreateJSONBody
- type RoutesCreateJSONRequestBody
- type RoutesCreateResponse
- type RoutesDeleteResponse
- type RoutesListResponse
- type RoutesReadResponse
- type RoutesUpdateJSONBody
- type RoutesUpdateJSONRequestBody
- type RoutesUpdateResponse
- type UpdateJSONBody
- type UpdateJSONRequestBody
- type UpdateResponse
- type WebHook
Constants ¶
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
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[K contracts.ClientFlowConfig] 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 contracts.ClientInterface[K] }
Client which conforms to the OpenAPI3 specification for this service.
func NewRawClient ¶
func NewRawClient[K contracts.ClientFlowConfig](server string, httpClient contracts.ClientInterface[K]) *Client[K]
NewRawClient Creates a new Client, with reasonable defaults
func (*Client[K]) ReceiversCreateRaw ¶
func (c *Client[K]) ReceiversCreateRaw(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client[K]) ReceiversCreateRawWithBody ¶
func (*Client[K]) ReceiversDeleteRaw ¶
func (*Client[K]) ReceiversListRaw ¶
func (*Client[K]) ReceiversReadRaw ¶
func (*Client[K]) ReceiversUpdateRaw ¶
func (*Client[K]) ReceiversUpdateRawWithBody ¶
func (*Client[K]) RoutesCreateRaw ¶
func (c *Client[K]) RoutesCreateRaw(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client[K]) RoutesCreateRawWithBody ¶
func (*Client[K]) RoutesDeleteRaw ¶
func (*Client[K]) RoutesListRaw ¶
func (*Client[K]) RoutesReadRaw ¶
func (*Client[K]) RoutesUpdateRaw ¶
func (*Client[K]) RoutesUpdateRawWithBody ¶
type ClientWithResponses ¶
type ClientWithResponses[K contracts.ClientFlowConfig] struct { // contains filtered or unexported fields }
ClientWithResponses builds on rawClientInterface to offer response payloads
func NewClient ¶
func NewClient[K contracts.ClientFlowConfig](server string, httpClient contracts.ClientInterface[K]) *ClientWithResponses[K]
NewClient creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses[K]) List ¶
func (c *ClientWithResponses[K]) List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error)
List request returning *ListResponse
func (*ClientWithResponses[K]) ParseListResponse ¶
func (c *ClientWithResponses[K]) ParseListResponse(rsp *http.Response) (*ListResponse, error)
ParseListResponse parses an HTTP response from a List call
func (*ClientWithResponses[K]) ParseReceiversCreateResponse ¶
func (c *ClientWithResponses[K]) ParseReceiversCreateResponse(rsp *http.Response) (*ReceiversCreateResponse, error)
ParseReceiversCreateResponse parses an HTTP response from a ReceiversCreate call
func (*ClientWithResponses[K]) ParseReceiversDeleteResponse ¶
func (c *ClientWithResponses[K]) ParseReceiversDeleteResponse(rsp *http.Response) (*ReceiversDeleteResponse, error)
ParseReceiversDeleteResponse parses an HTTP response from a ReceiversDelete call
func (*ClientWithResponses[K]) ParseReceiversListResponse ¶
func (c *ClientWithResponses[K]) ParseReceiversListResponse(rsp *http.Response) (*ReceiversListResponse, error)
ParseReceiversListResponse parses an HTTP response from a ReceiversList call
func (*ClientWithResponses[K]) ParseReceiversReadResponse ¶
func (c *ClientWithResponses[K]) ParseReceiversReadResponse(rsp *http.Response) (*ReceiversReadResponse, error)
ParseReceiversReadResponse parses an HTTP response from a ReceiversRead call
func (*ClientWithResponses[K]) ParseReceiversUpdateResponse ¶
func (c *ClientWithResponses[K]) ParseReceiversUpdateResponse(rsp *http.Response) (*ReceiversUpdateResponse, error)
ParseReceiversUpdateResponse parses an HTTP response from a ReceiversUpdate call
func (*ClientWithResponses[K]) ParseRoutesCreateResponse ¶
func (c *ClientWithResponses[K]) ParseRoutesCreateResponse(rsp *http.Response) (*RoutesCreateResponse, error)
ParseRoutesCreateResponse parses an HTTP response from a RoutesCreate call
func (*ClientWithResponses[K]) ParseRoutesDeleteResponse ¶
func (c *ClientWithResponses[K]) ParseRoutesDeleteResponse(rsp *http.Response) (*RoutesDeleteResponse, error)
ParseRoutesDeleteResponse parses an HTTP response from a RoutesDelete call
func (*ClientWithResponses[K]) ParseRoutesListResponse ¶
func (c *ClientWithResponses[K]) ParseRoutesListResponse(rsp *http.Response) (*RoutesListResponse, error)
ParseRoutesListResponse parses an HTTP response from a RoutesList call
func (*ClientWithResponses[K]) ParseRoutesReadResponse ¶
func (c *ClientWithResponses[K]) ParseRoutesReadResponse(rsp *http.Response) (*RoutesReadResponse, error)
ParseRoutesReadResponse parses an HTTP response from a RoutesRead call
func (*ClientWithResponses[K]) ParseRoutesUpdateResponse ¶
func (c *ClientWithResponses[K]) ParseRoutesUpdateResponse(rsp *http.Response) (*RoutesUpdateResponse, error)
ParseRoutesUpdateResponse parses an HTTP response from a RoutesUpdate call
func (*ClientWithResponses[K]) ParseUpdateResponse ¶
func (c *ClientWithResponses[K]) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)
ParseUpdateResponse parses an HTTP response from a Update call
func (*ClientWithResponses[K]) ReceiversCreate ¶
func (c *ClientWithResponses[K]) ReceiversCreate(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)
func (*ClientWithResponses[K]) ReceiversCreateWithBody ¶
func (c *ClientWithResponses[K]) ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error)
ReceiversCreateWithBody request with arbitrary body returning *ReceiversCreateResponse
func (*ClientWithResponses[K]) ReceiversDelete ¶
func (c *ClientWithResponses[K]) ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversDeleteResponse, error)
ReceiversDelete request returning *ReceiversDeleteResponse
func (*ClientWithResponses[K]) ReceiversList ¶
func (c *ClientWithResponses[K]) ReceiversList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ReceiversListResponse, error)
ReceiversList request returning *ReceiversListResponse
func (*ClientWithResponses[K]) ReceiversRead ¶
func (c *ClientWithResponses[K]) ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversReadResponse, error)
ReceiversRead request returning *ReceiversReadResponse
func (*ClientWithResponses[K]) ReceiversUpdate ¶
func (c *ClientWithResponses[K]) ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)
func (*ClientWithResponses[K]) ReceiversUpdateWithBody ¶
func (c *ClientWithResponses[K]) ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error)
ReceiversUpdateWithBody request with arbitrary body returning *ReceiversUpdateResponse
func (*ClientWithResponses[K]) RoutesCreate ¶
func (c *ClientWithResponses[K]) RoutesCreate(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)
func (*ClientWithResponses[K]) RoutesCreateWithBody ¶
func (c *ClientWithResponses[K]) RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error)
RoutesCreateWithBody request with arbitrary body returning *RoutesCreateResponse
func (*ClientWithResponses[K]) RoutesDelete ¶
func (c *ClientWithResponses[K]) RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesDeleteResponse, error)
RoutesDelete request returning *RoutesDeleteResponse
func (*ClientWithResponses[K]) RoutesList ¶
func (c *ClientWithResponses[K]) RoutesList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RoutesListResponse, error)
RoutesList request returning *RoutesListResponse
func (*ClientWithResponses[K]) RoutesRead ¶
func (c *ClientWithResponses[K]) RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesReadResponse, error)
RoutesRead request returning *RoutesReadResponse
func (*ClientWithResponses[K]) RoutesUpdate ¶
func (c *ClientWithResponses[K]) RoutesUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body RoutesUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)
func (*ClientWithResponses[K]) RoutesUpdateWithBody ¶
func (c *ClientWithResponses[K]) RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error)
RoutesUpdateWithBody request with arbitrary body returning *RoutesUpdateResponse
func (*ClientWithResponses[K]) Update ¶
func (c *ClientWithResponses[K]) Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)
func (*ClientWithResponses[K]) UpdateWithBody ¶
func (c *ClientWithResponses[K]) UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)
UpdateWithBody request with arbitrary body returning *UpdateResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface[K contracts.ClientFlowConfig] interface { // List request List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error) // Update request with any body UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error) Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error) // ReceiversList request ReceiversList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ReceiversListResponse, error) // ReceiversCreate request with any body ReceiversCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error) ReceiversCreate(ctx context.Context, projectID string, instanceID string, body ReceiversCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversCreateResponse, error) // ReceiversDelete request ReceiversDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversDeleteResponse, error) // ReceiversRead request ReceiversRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*ReceiversReadResponse, error) // ReceiversUpdate request with any body ReceiversUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error) ReceiversUpdate(ctx context.Context, projectID string, instanceID string, receiver string, body ReceiversUpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*ReceiversUpdateResponse, error) // RoutesList request RoutesList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RoutesListResponse, error) // RoutesCreate request with any body RoutesCreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error) RoutesCreate(ctx context.Context, projectID string, instanceID string, body RoutesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*RoutesCreateResponse, error) // RoutesDelete request RoutesDelete(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesDeleteResponse, error) // RoutesRead request RoutesRead(ctx context.Context, projectID string, instanceID string, receiver string, reqEditors ...RequestEditorFn) (*RoutesReadResponse, error) // RoutesUpdate request with any body RoutesUpdateWithBody(ctx context.Context, projectID string, instanceID string, receiver string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RoutesUpdateResponse, error) RoutesUpdate(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 *openapiTypes.Email `json:"authIdentity,omitempty"` AuthPassword *string `json:"authPassword,omitempty"` AuthUsername *string `json:"authUsername,omitempty"` From *openapiTypes.Email `json:"from,omitempty"` SendResolved *bool `json:"sendResolved,omitempty"` Smarthost *string `json:"smarthost,omitempty"` To openapiTypes.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 Global ¶
type Global struct { OpsgenieAPIKey *string `json:"opsgenieApiKey,omitempty"` OpsgenieAPIURL *string `json:"opsgenieApiUrl,omitempty"` ResolveTimeout *string `json:"resolveTimeout,omitempty"` SmtpAuthIdentity *openapiTypes.Email `json:"smtpAuthIdentity,omitempty"` SmtpAuthPassword *string `json:"smtpAuthPassword,omitempty"` SmtpAuthUsername *string `json:"smtpAuthUsername,omitempty"` SmtpFrom *openapiTypes.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 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 ¶
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 ¶
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 ¶
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